Commit e0c6ffcf authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Moved tester code to main package

parent 12871ef6
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class AllTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("All suites");
LinphoneTestSuite suitesList = new LinphoneTestSuite();
suitesList.run(new String[]{"tester", "--list-suites"});
for (String suiteName : suitesList.getList()) {
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", suiteName});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest(suiteName, testName);
testSuites.addTest(test);
}
}
return testSuites;
}
}
...@@ -34,7 +34,6 @@ import java.util.Arrays; ...@@ -34,7 +34,6 @@ import java.util.Arrays;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
@RunWith(AllTests.class)
public class Tester { public class Tester {
public native void setApplicationContext(Context ct); public native void setApplicationContext(Context ct);
public native void removeApplicationContext(); public native void removeApplicationContext();
...@@ -76,23 +75,6 @@ public class Tester { ...@@ -76,23 +75,6 @@ public class Tester {
return run(array); return run(array);
} }
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("All suites");
LinphoneTestSuite suitesList = new LinphoneTestSuite();
suitesList.run(new String[]{"tester", "--list-suites"});
for (String suiteName : suitesList.getList()) {
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", suiteName});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest(suiteName, testName);
testSuites.addTest(test);
}
}
return testSuites;
}
public void setUp() throws IOException { public void setUp() throws IOException {
Factory.instance().setDebugMode(true, "LibLinphoneTester"); Factory.instance().setDebugMode(true, "LibLinphoneTester");
System.loadLibrary("bctoolbox-tester"); System.loadLibrary("bctoolbox-tester");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment