public void ShouldMatchImagesByHeight(int imageOneHeight, int imageTwoHeight, bool expectedResult) { var imageOne = new Bitmap(1, imageOneHeight); var imageTwo = new Bitmap(1, imageTwoHeight); ICompareBy subject = new CompareByExact(); var result = subject.AreEqual(imageOne, imageTwo); result.Equal.Should().Be(expectedResult); }
public void ShouldMatchImagesByWidth(int imageOneWidth, int imageTwoWidth, bool expectedResult) { var imageOne = new Bitmap(imageOneWidth, 1); var imageTwo = new Bitmap(imageTwoWidth, 1); ICompareBy subject = new CompareByExact(); var result = subject.AreEqual(imageOne, imageTwo); result.Equal.Should().Be(expectedResult); }
public void ShouldMatchByPixels(Color imageOneColor, Color imageTwoColor, bool expectedResult) { var imageOne = new Bitmap(1, 1); imageOne.SetPixel(0, 0, imageOneColor); var imageTwo = new Bitmap(1, 1); imageTwo.SetPixel(0, 0, imageTwoColor); ICompareBy subject = new CompareByExact(); var result = subject.AreEqual(imageOne, imageTwo); result.Equal.Should().Be(expectedResult); }