Esempio n. 1
0
        public void TestMapInverseShouldReturnDescendingValues(bool?value, byte red, byte green, byte blue)
        {
            _map = new BooleanToColorMap(_colorPalette.Colors, SortOrder.Descending);
            var color  = new Color(red, green, blue);
            var result = _map.MapInverse(color);

            Assert.That(result, Is.EqualTo(value));
        }
Esempio n. 2
0
        public void SetUp()
        {
            //_nullColor = new Color(127, 127, 127);

            _colorPalette = new ColorPaletteBuilder()
                            .WithColor(Color.FromRgb(255, 0, 0))
                            .WithColor(Color.FromRgb(0, 255, 0))
                            .WithColor(Color.FromRgb(0, 0, 255))
                            .Build();

            _map = new BooleanToColorMap(
                _colorPalette.Colors,
                SortOrder.Ascending);
        }