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); }
public void FactoryCreatesCIE76Analyzer() { var target = BitmapAnalyzerFactory.Create(AnalyzerTypes.CIE76, 2.3); Assert.IsInstanceOf(typeof(CIE76Analyzer), target); }
public void FactoryCreatesExactMatchAnalyzer() { var target = BitmapAnalyzerFactory.Create(AnalyzerTypes.ExactMatch, 2.3); Assert.IsInstanceOf(typeof(ExactMatchAnalyzer), target); }
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)); }