public void PinkShouldBeRecognizedAsRedTest()
        {
            var referenceBackgrounds = new ReferenceBackgrounds();
            referenceBackgrounds.Add("yellow", new Uri("resources\\yellow.jpg", UriKind.Relative));
            referenceBackgrounds.Add("black", new Uri("resources\\black.jpg", UriKind.Relative));
            referenceBackgrounds.Add("red", new Uri("resources\\red.jpg", UriKind.Relative));
            referenceBackgrounds.Add("green", new Uri("resources\\green.jpg", UriKind.Relative));
            var ip = new ImageProcessor(referenceBackgrounds);

            Assert.AreEqual("red", ip.GetNearestColor(new Uri("resources\\pink.jpg", UriKind.Relative)));
        }
Beispiel #2
0
 public ImageProcessor(ReferenceBackgrounds referenceBackgrounds)
 {
     this.referenceBackgrounds = referenceBackgrounds;
 }
 public ImageProcessor(ReferenceBackgrounds referenceBackgrounds)
 {
     this.referenceBackgrounds = referenceBackgrounds;
 }