public ReferenceColorMatcher(
     IReferenceColorMatchingStrategy matchingStrategy,
     IOptions <ReferenceColorMatchingSettings> referenceColorMatchingSettings)
 {
     _matchingStrategy = matchingStrategy ?? throw new ArgumentNullException(nameof(matchingStrategy));
     _referenceColorMatchingSettings = referenceColorMatchingSettings.Value ?? throw new ArgumentNullException(nameof(referenceColorMatchingSettings));
 }
Example #2
0
            public void Setup()
            {
                _defaultSettings = new ReferenceColorMatchingSettings()
                {
                    MinimumConfidenceThreshold = 0.8, MinimumConfidenceMargin = 0.2
                };
                var options = Options.Create(_defaultSettings);

                _matchingStrategy = new Mock <IReferenceColorMatchingStrategy>();

                _service = new ReferenceColorMatcher(_matchingStrategy.Object, options);
            }