コード例 #1
0
ファイル: BitmapComparerTests.cs プロジェクト: rafeekabid/T24
        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);
        }
コード例 #2
0
        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();
        }
コード例 #3
0
        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();
        }
コード例 #4
0
ファイル: BitmapComparerTests.cs プロジェクト: rafeekabid/T24
        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);
        }