Exemple #1
0
        public void ColourProviderLookupWithNullKeyShouldReturnEmptyValue()
        {
            var    provider = new ColourProvider();
            HueKey key;
            var    result = provider.Lookup(key);

            result.HasValue.Should().Be(false);
        }
Exemple #2
0
        public void ColourProviderLookupShouldFindAllHues()
        {
            var provider = new ColourProvider();

            foreach (var hue in provider.Hues)
            {
                provider.Lookup(hue.Key).HasValue.Should().BeTrue();
            }
        }
Exemple #3
0
        public void ColourProviderLookupWithIncorrectKeyShouldReturnEmptyValue()
        {
            var provider = new ColourProvider();
            var key      = new HueKey("xxxxxxxx", "yyyyyyyyyy");

            var result = provider.Lookup(key);

            result.HasValue.Should().Be(false);
        }
Exemple #4
0
        public void ColourProviderLookupShouldFindAHue()
        {
            var provider = new ColourProvider();
            var key      = new HueKey("amber", "Accent100");

            var result = provider.Lookup(key);

            result.HasValue.Should().Be(true);
            result.Value.Key.Should().Be(key);
        }