public void Test_MDPSummaryPalette_ChooseColour_MachineTarget() { var palette = new MDPSummaryPalette(); palette.Should().NotBeNull(); palette.UseMachineTargetMDP = true; palette.UseMachineTargetMDP.Should().Be(true); var data = new SubGridCellPassDataMDPEntryRecord(MEASURED_MDP, TARGET_MDP); var colors = new[] { palette.BelowMDPTargetRangeColour, palette.BelowMDPTargetRangeColour, palette.BelowMDPTargetRangeColour, palette.BelowMDPTargetRangeColour, palette.WithinMDPTargetRangeColour, palette.AboveMDPTargetRangeColour, palette.AboveMDPTargetRangeColour }; for (var i = 0; i < colors.Length; i++) { data.MeasuredMDP = (short)(MEASURED_MDP + i * MDP_INCREMENT); palette.ChooseColour(data.MeasuredMDP, data.TargetMDP).Should().Be(colors[i]); } }
public void Test_MDPSummaryPalette_Creation() { var palette = new MDPSummaryPalette(); palette.Should().NotBeNull(); palette.MDPPercentageRange.Min.Should().Be(75); palette.MDPPercentageRange.Max.Should().Be(110); palette.AbsoluteTargetMDP.Should().Be(50); palette.UseMachineTargetMDP.Should().Be(false); palette.AboveMDPTargetRangeColour.Should().Be(Color.Red); palette.WithinMDPTargetRangeColour.Should().Be(Color.Lime); palette.BelowMDPTargetRangeColour.Should().Be(Color.Blue); palette.PaletteTransitions.Should().BeNull(); }
public void Test_MDPSummaryPalette_ChooseColour_NullOverrideTarget() { var palette = new MDPSummaryPalette(); palette.Should().NotBeNull(); palette.AbsoluteTargetMDP = CellPassConsts.NullMDP; palette.AbsoluteTargetMDP.Should().Be(CellPassConsts.NullMDP); var data = new SubGridCellPassDataMDPEntryRecord(MEASURED_MDP, TARGET_MDP); var colors = new[] { Color.Empty, Color.Empty, Color.Empty, Color.Empty, Color.Empty, Color.Empty, Color.Empty }; for (var i = 0; i < colors.Length; i++) { data.MeasuredMDP = (short)(MEASURED_MDP + i * MDP_INCREMENT); palette.ChooseColour(data.MeasuredMDP, TARGET_MDP).Should().Be(colors[i]); } }