예제 #1
0
        public BitmapComparer(CompareOptions options = null)
        {
            if (options == null)
            {
                options = new CompareOptions();
            }
            Initialize(options);

            BitmapAnalyzer        = BitmapAnalyzerFactory.Create(AnalyzerType, JustNoticeableDifference);
            Labeler               = LabelerFactory.Create(LabelerType, DetectionPadding);
            BoundingBoxIdentifier = BoundingBoxIdentifierFactory.Create(BoundingBoxMode, BoundingBoxPadding);
        }
예제 #2
0
        public void FactoryCreatesCIE76Analyzer()
        {
            var target = BitmapAnalyzerFactory.Create(AnalyzerTypes.CIE76, 2.3);

            Assert.IsInstanceOf(typeof(CIE76Analyzer), target);
        }
예제 #3
0
        public void FactoryCreatesExactMatchAnalyzer()
        {
            var target = BitmapAnalyzerFactory.Create(AnalyzerTypes.ExactMatch, 2.3);

            Assert.IsInstanceOf(typeof(ExactMatchAnalyzer), target);
        }
예제 #4
0
 public void FactoryThrowsWithInvalidType()
 {
     BitmapAnalyzerFactory.Create((AnalyzerTypes)100, 2.3);
 }
        public void FactoryCreatesCIE76Analyzer()
        {
            var target = BitmapAnalyzerFactory.Create(AnalyzerTypes.CIE76, 2.3);

            target.ShouldBeOfType <CIE76Analyzer>();
        }
        public void FactoryCreatesExactMatchAnalyzer()
        {
            var target = BitmapAnalyzerFactory.Create(AnalyzerTypes.ExactMatch, 2.3);

            target.ShouldBeOfType <ExactMatchAnalyzer>();
        }
 public void FactoryThrowsWithInvalidType()
 {
     Should.Throw <ArgumentException>(() => BitmapAnalyzerFactory.Create((AnalyzerTypes)100, 2.3));
 }