use of de.dagere.peass.dependency.changesreading.ClazzChangeData in project peass by DaGeRe.
the class TestTestDependencies method testNonParameterChange.
private void testNonParameterChange(final TestDependencies dependencies) {
HashMap<ChangedEntity, ClazzChangeData> changeTestMap = new HashMap<ChangedEntity, ClazzChangeData>();
ClazzChangeData classChangeData = new ClazzChangeData(new ChangedEntity("package.ClazzB", "moduleA"), true);
classChangeData.addChange("ClazzB", "methodB");
changeTestMap.put(new ChangedEntity("package.ClazzB", "moduleA"), classChangeData);
ChangeTestMapping changes = dependencies.getChangeTestMap(changeTestMap);
Assert.assertEquals(1, changes.getChanges().size());
}
use of de.dagere.peass.dependency.changesreading.ClazzChangeData in project peass by DaGeRe.
the class TestTestDependencies method testClassLevelChange.
@Test
public void testClassLevelChange() {
TestDependencies dependencies = buildTestDependencies();
HashMap<ChangedEntity, ClazzChangeData> changes = new HashMap<ChangedEntity, ClazzChangeData>();
ClazzChangeData clazzChangeData = new ClazzChangeData(new ChangedEntity("package.ClazzA", "moduleA"), false);
clazzChangeData.addChange("ClazzA", "methodB");
changes.put(new ChangedEntity("package.ClazzA", "moduleA"), clazzChangeData);
ChangeTestMapping changeTestMap = dependencies.getChangeTestMap(changes);
Set<ChangedEntity> changedClazzes = changeTestMap.getChanges().keySet();
MatcherAssert.assertThat(changedClazzes, IsIterableContaining.hasItem(new ChangedEntity("package.ClazzA", "moduleA", "methodB")));
MatcherAssert.assertThat(changeTestMap.getChanges().get(new ChangedEntity("package.ClazzA", "moduleA", "methodB")), IsIterableContaining.hasItem(testEntity));
MatcherAssert.assertThat(changeTestMap.getChanges().get(new ChangedEntity("package.ClazzA", "moduleA")), IsIterableContaining.hasItem(testEntity));
}
Aggregations