use of de.dagere.peass.dependency.reader.DependencyReader in project peass by DaGeRe.
the class DependencyDetectorIT method testAddedClass.
@Test
public void testAddedClass() throws Exception {
final File secondVersion = new File(DependencyTestConstants.VERSIONS_FOLDER, "added_class");
final ChangeManager changeManager = DependencyDetectorTestUtil.mockAddedChangeManager();
final VersionIterator fakeIterator = new FakeFileIterator(DependencyTestConstants.CURRENT, Arrays.asList(secondVersion));
final DependencyReader reader = DependencyDetectorTestUtil.readTwoVersions(changeManager, fakeIterator);
System.out.println(reader.getDependencies());
DependencyDetectorTestUtil.checkTestMeAlsoTestChange(reader, "defaultpackage.TestMeAlso", "defaultpackage.TestMeAlso", DependencyTestConstants.VERSION_1);
}
use of de.dagere.peass.dependency.reader.DependencyReader in project peass by DaGeRe.
the class DependencyDetectorITGradle method testNormalChange.
// @org.junit.After
// public void cleanAfterwards() throws IOException {
// FileUtils.deleteDirectory(CURRENT);
// // be aware: maven does not compile if a .class-file is still in the resources, since it gets identified as test
// }
@Test
public void testNormalChange() throws IOException, InterruptedException, XmlPullParserException, ParseException, ViewNotFoundException {
init(BASIC_STATE);
final ChangeManager changeManager = DependencyDetectorTestUtil.defaultChangeManager();
final VersionIterator fakeIterator = new FakeFileIterator(DependencyTestConstants.CURRENT, Arrays.asList(CHANGE));
final DependencyReader reader = DependencyDetectorTestUtil.readTwoVersions(changeManager, fakeIterator);
DependencyDetectorTestUtil.checkTestMeAlsoTestChange(reader, "defaultpackage.NormalDependency#executeThing", "defaultpackage.TestMe", DependencyTestConstants.VERSION_1);
}
use of de.dagere.peass.dependency.reader.DependencyReader in project peass by DaGeRe.
the class DependencyDetectorITGradle method testNormalChangeAndroid.
@Test
public void testNormalChangeAndroid() throws IOException, InterruptedException, XmlPullParserException, ParseException, ViewNotFoundException {
init(BASIC_STATE_ANDROID);
final ChangeManager changeManager = DependencyDetectorTestUtil.defaultChangeManager();
final VersionIterator fakeIterator = new FakeFileIterator(DependencyTestConstants.CURRENT, Arrays.asList(CHANGE_ANDROID));
final DependencyReader reader = DependencyDetectorTestUtil.readTwoVersions(changeManager, fakeIterator);
DependencyDetectorTestUtil.checkTestMeAlsoTestChange(reader, "defaultpackage.NormalDependency#executeThing", "defaultpackage.TestMe", DependencyTestConstants.VERSION_1);
}
use of de.dagere.peass.dependency.reader.DependencyReader in project peass by DaGeRe.
the class DependencyDetectorIncludesTest method executeWithInclude.
private DependencyReader executeWithInclude(final String includeName, final File secondVersion, final ChangeManager changeManager) throws IOException, InterruptedException, XmlPullParserException, ParseException, ViewNotFoundException {
final VersionIterator fakeIterator = new FakeFileIterator(DependencyTestConstants.CURRENT, Arrays.asList(secondVersion));
ExecutionConfig config = new ExecutionConfig(5);
config.getIncludes().add(includeName);
final DependencyReader reader = DependencyDetectorTestUtil.readTwoVersions(changeManager, fakeIterator, config, DependencyTestConstants.DEFAULT_CONFIG_NO_VIEWS, DependencyTestConstants.NULL_RESULTS_FOLDERS);
return reader;
}
use of de.dagere.peass.dependency.reader.DependencyReader in project peass by DaGeRe.
the class DependencyDetectorIncludesTest method testNormalChangeIncluded.
@Test
public void testNormalChangeIncluded() throws IOException, InterruptedException, XmlPullParserException, ParseException, ViewNotFoundException {
final ChangeManager changeManager = DependencyDetectorTestUtil.defaultChangeManager();
final DependencyReader reader = executeWithInclude("defaultpackage.TestMe#testMe", DependencyTestConstants.NORMAL_CHANGE, changeManager);
checkContainsOnlyTestMe(reader);
}
Aggregations