use of org.eclipse.reddeer.junit.internal.configuration.SuiteConfiguration in project reddeer by eclipse.
the class RequirementOrderCallWithFailsTest method testFailingTest.
@Test
public void testFailingTest() throws InitializationError {
SuiteConfiguration config = new SuiteConfiguration(RequirementOrderFailedTest.class);
List<Runner> runners = RedDeerSuite.createSuites(RequirementOrderFailedTest.class, config);
Runner myRunner = runners.get(0);
RunNotifier notifier = new RunNotifier();
// runner.run executes the test and static values could be retrieved
myRunner.run(notifier);
String sequenceDiff = TestSequence.diffRealSequence(RequirementsOrderRunnerSuite.getStaticExpectedSequence());
assertTrue("Test sequence is different than expected. " + sequenceDiff, sequenceDiff == null);
}
use of org.eclipse.reddeer.junit.internal.configuration.SuiteConfiguration in project reddeer by eclipse.
the class RequirementOrderCallWithFailsTest method testErroneousTest.
@Test
public void testErroneousTest() throws InitializationError {
SuiteConfiguration config = new SuiteConfiguration(RequirementOrderErroneousTest.class);
List<Runner> runners = RedDeerSuite.createSuites(RequirementOrderErroneousTest.class, config);
Runner myRunner = runners.get(0);
RunNotifier notifier = new RunNotifier();
// runner.run executes the test and static values could be retrieved
myRunner.run(notifier);
String sequenceDiff = TestSequence.diffRealSequence(RequirementsOrderRunnerSuite.getStaticExpectedSequence());
assertTrue("Test sequence is different than expected. " + sequenceDiff, sequenceDiff == null);
}
use of org.eclipse.reddeer.junit.internal.configuration.SuiteConfiguration in project reddeer by eclipse.
the class ComplexConfigurationTest method numberOfTestRunsWithConfig.
@Test
public void numberOfTestRunsWithConfig() throws InitializationError {
System.setProperty(RedDeerProperties.CONFIG_FILE.getName(), JAVA_CONFIG_FILE);
config = new SuiteConfiguration(RequirementJavaClass.class);
assertThat(config.getConfigurationSetsSuites().keySet().size(), is(3));
System.clearProperty(RedDeerProperties.CONFIG_FILE.getName());
}
use of org.eclipse.reddeer.junit.internal.configuration.SuiteConfiguration in project reddeer by eclipse.
the class RedDeerSuiteTest method testRequirementsSuiteWithConfiguration.
@Test
public void testRequirementsSuiteWithConfiguration() throws InitializationError {
System.setProperty(RedDeerProperties.CONFIG_FILE.getName(), REDDEER_SUITE_CONFIG);
SuiteConfiguration config = new SuiteConfiguration(RequirementSuite.class);
List<Runner> runners = RedDeerSuite.createSuites(RequirementSuite.class, config);
String java7config = "java-1.7";
String tomcat2 = "server-tomcat2";
assertThat(runners.size(), is(6));
assertThat(runners, hasItem(new NamedSuiteMatcher(java7config)));
assertThat(runners, hasItem(new NamedSuiteMatcher(tomcat2)));
assertThat(runners, hasItem(new NamedSuiteMatcher("no-configuration")));
}
use of org.eclipse.reddeer.junit.internal.configuration.SuiteConfiguration in project reddeer by eclipse.
the class RedDeerSuiteTest method testSingleTestWithoutConfiguration.
@Test
public void testSingleTestWithoutConfiguration() throws InitializationError {
System.setProperty(RedDeerProperties.CONFIG_FILE.getName(), REDDEER_SUITE_CONFIG);
SuiteConfiguration config = new SuiteConfiguration(SimpleTestClass.class);
List<Runner> runners = RedDeerSuite.createSuites(SimpleTestClass.class, config);
assertThat(runners.size(), is(1));
assertThat(runners, hasItem(new NamedSuiteMatcher("no-configuration")));
}
Aggregations