use of junit.framework.JUnit4TestAdapter in project JMRI by JMRI.
the class PackageTest method suite.
// test suite from all defined tests
public static Test suite() {
TestSuite suite = new TestSuite("jmri.jmrit.roster.PackageTest");
suite.addTest(new JUnit4TestAdapter(BundleTest.class));
suite.addTest(RosterEntryTest.suite());
suite.addTest(new JUnit4TestAdapter(RosterTest.class));
suite.addTest(new JUnit4TestAdapter(jmri.jmrit.roster.configurexml.PackageTest.class));
suite.addTest(new JUnit4TestAdapter(CopyRosterItemActionTest.class));
suite.addTest(RosterEntryPaneTest.suite());
suite.addTest(new JUnit4TestAdapter(FunctionLabelPaneTest.class));
suite.addTest(IdentifyLocoTest.suite());
suite.addTest(jmri.jmrit.roster.swing.PackageTest.suite());
suite.addTest(new JUnit4TestAdapter(LocoFileTest.class));
suite.addTest(new JUnit4TestAdapter(RecreateRosterActionTest.class));
suite.addTest(new JUnit4TestAdapter(RosterConfigManagerTest.class));
suite.addTest(new JUnit4TestAdapter(RosterConfigPaneTest.class));
suite.addTest(new JUnit4TestAdapter(RosterIconFactoryTest.class));
suite.addTest(new JUnit4TestAdapter(RosterMediaPaneTest.class));
suite.addTest(new JUnit4TestAdapter(RosterRecorderTest.class));
suite.addTest(new JUnit4TestAdapter(jmri.jmrit.roster.rostergroup.PackageTest.class));
return suite;
}
use of junit.framework.JUnit4TestAdapter in project bnd by bndtools.
the class Activator method addTest.
@SuppressWarnings("unchecked")
private void addTest(TestSuite suite, Class<?> clazz, final String method) {
if (TestCase.class.isAssignableFrom(clazz)) {
if (hasJunit4Annotations(clazz)) {
error("The test class %s extends %s and it uses JUnit 4 annotations. This means that the annotations will be ignored.", clazz.getName(), TestCase.class.getName());
}
trace("using JUnit 3");
if (method != null) {
suite.addTest(TestSuite.createTest(clazz, method));
return;
}
suite.addTestSuite((Class<? extends TestCase>) clazz);
return;
}
trace("using JUnit 4");
JUnit4TestAdapter adapter = new JUnit4TestAdapter(clazz);
if (method != null) {
trace("method specified " + clazz + ":" + method);
final Pattern glob = Pattern.compile(method.replaceAll("\\*", ".*").replaceAll("\\?", ".?"));
try {
adapter.filter(new org.junit.runner.manipulation.Filter() {
@Override
public String describe() {
return "Method filter for " + method;
}
@Override
public boolean shouldRun(Description description) {
if (glob.matcher(description.getMethodName()).lookingAt()) {
trace("accepted " + description.getMethodName());
return true;
}
trace("rejected " + description.getMethodName());
return false;
}
});
} catch (NoTestsRemainException e) {
return;
}
}
suite.addTest(adapter);
}
use of junit.framework.JUnit4TestAdapter in project pentaho-kettle by pentaho.
the class AllRegressionTestsIT method suite.
public static Test suite() throws Exception {
TestSuite suite = new TestSuite("Run regression tests");
// The testcases should be executed from easy to hard. It
// actually defines the debugging sequence if ever required.
// If some of the suites fail you should start checking/debugging
// the suites from the first that failed onwards.
//
// So adding testcases in the right order is important.
//
suite.addTest(new JUnit4TestAdapter(StringEvaluatorIT.class));
suite.addTestSuite(ParameterSimpleTransIT.class);
// suite.addTestSuite( ValueDataUtilTest.class );
suite.addTest(new JUnit4TestAdapter(DatabaseIT.class));
suite.addTest(new JUnit4TestAdapter(ConnectionPoolUtilIntegrationIT.class));
suite.addTestSuite(HopIT.class);
suite.addTestSuite(InjectorIT.class);
suite.addTestSuite(RowGeneratorIT.class);
suite.addTestSuite(ConstantIT.class);
suite.addTestSuite(AppendIT.class);
suite.addTestSuite(DetectLastRowStepIT.class);
suite.addTestSuite(BlockingStepIT.class);
suite.addTest(new JUnit4TestAdapter(SortRowsIT.class));
suite.addTest(new JUnit4TestAdapter(FilterRowsIT.class));
suite.addTestSuite(ValueMapperIT.class);
suite.addTestSuite(NullIfIT.class);
suite.addTestSuite(RegexEvalIT.class);
suite.addTestSuite(AddSequenceIT.class);
suite.addTestSuite(TableInputIT.class);
suite.addTestSuite(TableOutputIT.class);
// suite.addTestSuite(DatabaseLookupTest.class); Now a JUnit 4 testcase
suite.addTestSuite(CombinationLookupIT.class);
suite.addTestSuite(JavaScriptStringIT.class);
suite.addTestSuite(JavaScriptSpecialIT.class);
// suite.addTestSuite( GetXMLDataTest.class );
suite.addTestSuite(CsvInput1IT.class);
suite.addTestSuite(CsvInput2IT.class);
suite.addTestSuite(WebServiceIT.class);
suite.addTest(new JUnit4TestAdapter(GPLoadIT.class));
suite.addTest(new JUnit4TestAdapter(TransExecutorIT.class));
return suite;
}
use of junit.framework.JUnit4TestAdapter in project JMRI by JMRI.
the class PackageTest method suite.
// test suite from all defined tests
public static Test suite() {
// no tests in this class itself
TestSuite suite = new TestSuite("jmri.jmrit.withrottle.PackageTest");
suite.addTest(new junit.framework.JUnit4TestAdapter(BundleTest.class));
suite.addTest(ConsistControllerTest.suite());
suite.addTest(ConsistFunctionControllerTest.suite());
suite.addTest(DeviceServerTest.suite());
suite.addTest(FacelessServerTest.suite());
suite.addTest(MultiThrottleControllerTest.suite());
suite.addTest(MultiThrottleTest.suite());
suite.addTest(RouteControllerTest.suite());
suite.addTest(ThrottleControllerTest.suite());
suite.addTest(TrackPowerControllerTest.suite());
suite.addTest(TurnoutControllerTest.suite());
suite.addTest(WiFiConsistFileTest.suite());
suite.addTest(WiFiConsistTest.suite());
suite.addTest(WiFiConsistManagerTest.suite());
suite.addTest(WiThrottleManagerTest.suite());
suite.addTest(WiThrottlePreferencesTest.suite());
suite.addTest(WiThrottlesListModelTest.suite());
suite.addTest(new JUnit4TestAdapter(WiThrottlePrefsPanelTest.class));
suite.addTest(new JUnit4TestAdapter(ControllerFilterActionTest.class));
suite.addTest(new JUnit4TestAdapter(ControllerFilterFrameTest.class));
suite.addTest(new JUnit4TestAdapter(UserInterfaceTest.class));
suite.addTest(new JUnit4TestAdapter(WiThrottleCreationActionTest.class));
return suite;
}
use of junit.framework.JUnit4TestAdapter in project JMRI by JMRI.
the class PackageTest method suite.
// test suite from all defined tests
public static Test suite() {
apps.tests.AllTest.initLogging();
TestSuite suite = new TestSuite("jmri.jmrix.easydcc.EasyDccTest");
suite.addTest(new junit.framework.JUnit4TestAdapter(EasyDccTurnoutTest.class));
suite.addTest(new junit.framework.JUnit4TestAdapter(EasyDccTurnoutManagerTest.class));
suite.addTest(jmri.jmrix.easydcc.EasyDccProgrammerTest.suite());
suite.addTest(new junit.framework.JUnit4TestAdapter(EasyDccTrafficControllerTest.class));
suite.addTest(jmri.jmrix.easydcc.EasyDccMessageTest.suite());
suite.addTest(jmri.jmrix.easydcc.EasyDccReplyTest.suite());
suite.addTest(new JUnit4TestAdapter(EasyDccPowerManagerTest.class));
suite.addTest(jmri.jmrix.easydcc.EasyDccConsistManagerTest.suite());
suite.addTest(new JUnit4TestAdapter(EasyDccConsistTest.class));
suite.addTest(new JUnit4TestAdapter(jmri.jmrix.easydcc.serialdriver.PackageTest.class));
suite.addTest(new JUnit4TestAdapter(jmri.jmrix.easydcc.networkdriver.PackageTest.class));
suite.addTest(new JUnit4TestAdapter(jmri.jmrix.easydcc.configurexml.PackageTest.class));
suite.addTest(new JUnit4TestAdapter(jmri.jmrix.easydcc.easydccmon.EasyDccMonFrameTest.class));
suite.addTest(jmri.jmrix.easydcc.easydccmon.EasyDccMonActionTest.suite());
suite.addTest(new JUnit4TestAdapter(jmri.jmrix.easydcc.packetgen.PackageTest.class));
suite.addTest(new JUnit4TestAdapter(EasyDccNetworkPortControllerTest.class));
suite.addTest(new JUnit4TestAdapter(EasyDccSystemConnectionMemoTest.class));
suite.addTest(new JUnit4TestAdapter(EasyDccPortControllerTest.class));
suite.addTest(new JUnit4TestAdapter(EasyDCCMenuTest.class));
suite.addTest(new JUnit4TestAdapter(EasyDccConnectionTypeListTest.class));
suite.addTest(new JUnit4TestAdapter(EasyDccCommandStationTest.class));
suite.addTest(new JUnit4TestAdapter(EasyDccOpsModeProgrammerTest.class));
suite.addTest(new JUnit4TestAdapter(EasyDccProgrammerManagerTest.class));
suite.addTest(new JUnit4TestAdapter(EasyDccThrottleManagerTest.class));
suite.addTest(new JUnit4TestAdapter(EasyDccThrottleTest.class));
return suite;
}
Aggregations