public virtual void testSameSizeDiff() { ImageDiff diff = IMAGE_DIFFER.makeDiff(IMAGE_A_SMALL, IMAGE_B_SMALL); Matcher <Bitmap> matcher = ImageTool.equalImage(loadImage("img/expected/same_size_diff.png")); Assert.IsTrue(matcher.Matches(diff.getMarkedImage())); }
public virtual void testIgnoredCoordsSame() { Screenshot a = this.createScreenshotWithSameIgnoredAreas(IMAGE_A_SMALL); Screenshot b = this.createScreenshotWithSameIgnoredAreas(IMAGE_B_SMALL); ImageDiff diff = IMAGE_DIFFER.makeDiff(a, b); Matcher <Bitmap> matcher = ImageTool.equalImage(loadImage("img/expected/ignore_coords_same.png")); Assert.IsTrue(matcher.Matches(diff.getMarkedImage())); }
public virtual void testCoordsToCompareAndIgnoredCombine() { Screenshot a = this.createScreenshotWithIgnoredAreas(IMAGE_A_SMALL, new HashSet <Coords> { new Coords(0, 0, 60, 60) }); a.setCoordsToCompare(new HashSet <Coords> { new Coords(50, 50, 100, 100) }); Screenshot b = this.createScreenshotWithIgnoredAreas(IMAGE_B_SMALL, new HashSet <Coords> { new Coords(0, 0, 80, 80) }); b.setCoordsToCompare(new HashSet <Coords> { new Coords(50, 50, 100, 100) }); ImageDiff diff = IMAGE_DIFFER.makeDiff(a, b); Matcher <Bitmap> matcher = ImageTool.equalImage(loadImage("img/expected/combined_diff.png")); Assert.IsTrue(matcher.Matches(diff.getMarkedImage())); }