public void EqualsReturnsFalseWithNullSecondImage(AnalyzerTypes aType, BoundingBoxModes bMode, LabelerTypes lType) { var target = new BitmapComparer(new CompareOptions { BoundingBoxColor = Color.Red, BoundingBoxMode = bMode, AnalyzerType = aType, DetectionPadding = 2, BoundingBoxPadding = 2, Labeler = lType }); var result = target.Equals(FirstImage, null); Assert.IsFalse(result); }
public void EqualsReturnsTrueWithNullImages(AnalyzerTypes aType, BoundingBoxModes bMode, LabelerTypes lType) { var target = new BitmapComparer(new CompareOptions { BoundingBoxColor = Color.Red, BoundingBoxMode = bMode, AnalyzerType = aType, DetectionPadding = 2, BoundingBoxPadding = 2, Labeler = lType }); var result = target.Equals(null, null); result.ShouldBeTrue(); }
public void EqualsReturnsFalseWithDifferentImage(AnalyzerTypes aType, BoundingBoxModes bMode, LabelerTypes lType) { var target = new BitmapComparer(new CompareOptions { BoundingBoxColor = Color.Red, BoundingBoxMode = bMode, AnalyzerType = aType, DetectionPadding = 2, BoundingBoxPadding = 2, Labeler = lType }); var result = target.Equals(FirstImage, SecondImage); result.ShouldBeFalse(); }
public void EqualsReturnsTrueWithSameImage(AnalyzerTypes aType, BoundingBoxModes bMode, LabelerTypes lType) { var target = new BitmapComparer(new CompareOptions { BoundingBoxColor = Color.Red, BoundingBoxMode = bMode, AnalyzerType = aType, DetectionPadding = 2, BoundingBoxPadding = 2, Labeler = lType }); var newInstanceOfFirstImage = new Bitmap(TestImage1); var result = target.Equals(FirstImage, newInstanceOfFirstImage); Assert.IsTrue(result); }