use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.
the class TestVersionDiff method testTestContainigPath.
@Test
public void testTestContainigPath() throws IOException {
createFile(TOMCAT_EXAMPLE);
createFile(NO_SOURCE_FOLDER);
VersionDiff diff = createVersionDiff();
ExecutionConfig config = new ExecutionConfig();
config.getClazzFolders().clear();
config.getClazzFolders().add("java");
config.getTestClazzFolders().clear();
config.getTestClazzFolders().add("test");
diff.addChange(TOMCAT_EXAMPLE, config);
diff.addChange(NO_SOURCE_FOLDER, config);
MatcherAssert.assertThat(diff.getChangedClasses(), IsIterableContaining.hasItem(new ChangedEntity("de.dagere.peass.CoyoteAdapter")));
MatcherAssert.assertThat(diff.getChangedClasses(), Matchers.not(IsIterableContaining.hasItem(new ChangedEntity("de.dagere.peass.Example2"))));
}
use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.
the class TestNonIncludedTestRemover method testWithSetOnlyExclude.
@Test
public void testWithSetOnlyExclude() {
Set<TestCase> tests = new HashSet<TestCase>();
tests.add(new TestCase("TestA", "method1"));
tests.add(new TestCase("TestA", "method2"));
tests.add(new TestCase("TestB", "method3"));
tests.add(new TestCase("TestC", null));
tests.add(new TestCase("TestD", null));
ExecutionConfig executionConfig = new ExecutionConfig(Arrays.asList(new String[] {}), "test");
executionConfig.setExcludes(Arrays.asList(new String[] { "TestA#*" }));
NonIncludedTestRemover.removeNotIncluded(tests, executionConfig);
Assert.assertEquals(3, tests.size());
}
use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.
the class TestNonIncludedTestRemover method testWithTestSet.
@Test
public void testWithTestSet() {
TestSet tests = new TestSet();
tests.addTest(new TestCase("TestA", "method1"));
tests.addTest(new TestCase("TestA", "method2"));
tests.addTest(new TestCase("TestB", "method3"));
tests.addTest(new TestCase("TestC", null));
tests.addTest(new TestCase("TestD", null));
NonIncludedTestRemover.removeNotIncluded(tests, new ExecutionConfig(Arrays.asList(new String[] { "TestA#method1", "TestC" }), "test"));
Assert.assertEquals(2, tests.getTests().size());
}
use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.
the class TestExecutorCreation method testMavenExecutorCreation.
@Test
public void testMavenExecutorCreation() {
ExecutionConfig config = new ExecutionConfig();
TestTransformer testTransformer = ExecutorCreator.createTestTransformer(Mockito.mock(PeassFolders.class), config, new KiekerConfig(true));
Assert.assertNotNull(testTransformer);
}
use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.
the class TestPackageFinder method testDependencyModule.
@Test
public void testDependencyModule() {
ExecutionConfig config = new ExecutionConfig();
config.getClazzFolders().add("src/main/java");
config.getClazzFolders().add("src/java");
final List<String> lowestPackage = new ClazzFileFinder(config).getClasses(new File("."));
System.out.println(lowestPackage);
MatcherAssert.assertThat(lowestPackage, IsIterableContaining.hasItem("de.dagere.peass.RegressionTestSelectionStarter"));
MatcherAssert.assertThat(lowestPackage, Matchers.not(IsIterableContaining.hasItem("de.dagere.peass.RegressionTestSelectionStarter.RegressionTestSelectionStarter")));
MatcherAssert.assertThat(lowestPackage, IsIterableContaining.hasItem("de.dagere.peass.dependency.statistics.DependencyStatisticAnalyzer"));
MatcherAssert.assertThat(lowestPackage, IsIterableContaining.hasItem("de.dagere.peass.dependency.statistics.DependencyStatistics"));
MatcherAssert.assertThat(lowestPackage, IsIterableContaining.hasItem("de.dagere.peass.TestPackageFinder"));
}
Aggregations