コード例 #1
0
        public void CalculateLibrarySuitablityWithEmptyLibrariesReturnsZero()
        {
            var model = new GenerateMosaicColoursModel();

            model.TileImageColorDictionary   = new Dictionary <string, int>();
            model.MasterImageColorDictionary = new Dictionary <string, int>();
            var suitability = model.CalulateLibrarySuitability();

            Assert.AreEqual(0, suitability);
        }
コード例 #2
0
        public void CalculateLibrarySuitabilityOfCompleteMatchReturns100()
        {
            var model = new GenerateMosaicColoursModel();

            model.TileImageColorDictionary = new Dictionary <string, int>();
            model.TileImageColorDictionary.Add(Color.White.ToHex(), 1);
            model.MasterImageColorDictionary = new Dictionary <string, int>();
            model.MasterImageColorDictionary.Add(Color.White.ToHex(), 1);
            var suitability = model.CalulateLibrarySuitability();

            Assert.AreEqual(100, suitability);
        }