use of ru.yandex.qatools.ashot.comparison.ImageDiff in project ashot by yandex-qatools.
the class DifferTest method testDifferentSizeDiff.
@Test
public void testDifferentSizeDiff() throws Exception {
ImageDiff diff = imageDiffer.makeDiff(IMAGE_B_SMALL, IMAGE_B_BIG);
assertThat(diff.getMarkedImage(), ImageTool.equalImage(loadImage("img/expected/different_size_diff.png")));
}
use of ru.yandex.qatools.ashot.comparison.ImageDiff in project ashot by yandex-qatools.
the class DifferTest method testSetDiffSizeTrigger.
@Test
public void testSetDiffSizeTrigger() throws Exception {
ImageDiff diff = imageDiffer.makeDiff(IMAGE_A_SMALL, IMAGE_B_SMALL);
assertThat(diff.withDiffSizeTrigger(624).hasDiff(), is(false));
assertThat(diff.withDiffSizeTrigger(623).hasDiff(), is(true));
}
use of ru.yandex.qatools.ashot.comparison.ImageDiff in project ashot by yandex-qatools.
the class DifferTest method testIgnoredCoordsSame.
@Test
public void testIgnoredCoordsSame() throws Exception {
Screenshot a = createScreenshotWithSameIgnoredAreas(IMAGE_A_SMALL);
Screenshot b = createScreenshotWithSameIgnoredAreas(IMAGE_B_SMALL);
ImageDiff diff = imageDiffer.makeDiff(a, b);
assertThat(diff.getMarkedImage(), ImageTool.equalImage(loadImage("img/expected/ignore_coords_same.png")));
}
use of ru.yandex.qatools.ashot.comparison.ImageDiff in project ashot by yandex-qatools.
the class DifferTest method testIgnoredCoordsNotSame.
@Test
public void testIgnoredCoordsNotSame() throws Exception {
Screenshot a = createScreenshotWithIgnoredAreas(IMAGE_A_SMALL, new HashSet<>(asList(new Coords(55, 55))));
Screenshot b = createScreenshotWithIgnoredAreas(IMAGE_B_SMALL, new HashSet<>(asList(new Coords(80, 80))));
ImageDiff diff = imageDiffer.makeDiff(a, b);
assertThat(diff.getMarkedImage(), ImageTool.equalImage(loadImage("img/expected/ignore_coords_not_same.png")));
}
Aggregations