I've created a neomad project as a test project to run unit test based on code from my main neomad application project. The issue that I'm running into is that I encounter errors like the following:
Syntax error, static imports are only available if source level is 1.5 or greater
I've changed the java build configuration to 1.8, however I still get the same type of errors. Is it that what I'm trying to do is not possible with neomad because it transpiles Java into other languages?
import com.neomades.app.Application;
import com.neomades.app.Controller;
import java.util.ArrayList;
import java.util.List;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
/**
* Entry point
*/
public class UnitTestsApp extends Application {
public void onStart(Controller controller) {
// first screen
controller.pushScreen(UnitTestsScreen.class);
controller.runOnBackgroundThread(new Runnable(){
public void run() {
List<Class> testCases = new ArrayList();
//Add test cases
testCases.add(JSONConverterTests.class);
JUnitCore core = new JUnitCore();
core.addListener(new TestRunListener());
for (Class testCase : testCases)
{
RunTestCase(testCase);
}
}
});
}
private static void RunTestCase(Class testCase)
{
Result result = JUnitCore.runClasses(testCase);
}
}