public void Test_HeightPalette_ChooseColour_NullElevation() { var palette = new HeightPalette(MIN_ELEVATION, MAX_ELEVATION); palette.Should().NotBeNull(); for (var i = 0; i < palette.ElevationPalette.Length; i++) { palette.ChooseColour(CellPassConsts.NullHeight).Should().Be(Color.Black); } }
public void Test_HeightPalette_ChooseColour() { const float START_ELEVATION = 110.0f; const float ELEVATION_INCREMENT = 13.33333333333333f; var palette = new HeightPalette(MIN_ELEVATION, MAX_ELEVATION); palette.Should().NotBeNull(); for (var i = 0; i < palette.ElevationPalette.Length; i++) { palette.ChooseColour(START_ELEVATION + i * ELEVATION_INCREMENT).Should().Be(palette.ElevationPalette[i]); } }