示例#1
0
        public void Test_CCVPercentPalette_ChooseColour_MachineTarget()
        {
            var palette = new CCVPercentPalette();

            palette.Should().NotBeNull();

            palette.UseMachineTargetCMV = true;
            palette.UseMachineTargetCMV.Should().Be(true);

            var data   = new SubGridCellPassDataCMVEntryRecord(MEASURED_CMV, TARGET_CMV, 0, 0);
            var colors = new[]
            {
                palette.BelowCMVTargetRangeColour,
                palette.BelowCMVTargetRangeColour,
                palette.BelowCMVTargetRangeColour,
                palette.BelowCMVTargetRangeColour,
                palette.WithinCMVTargetRangeColour,
                palette.WithinCMVTargetRangeColour,
                palette.AboveCMVTargetRangeColour
            };

            for (var i = 0; i < colors.Length; i++)
            {
                data.MeasuredCMV = (short)(MEASURED_CMV + i * CMV_INCREMENT);
                palette.ChooseColour(data.MeasuredCMV, data.TargetCMV).Should().Be(colors[i]);
            }
        }
示例#2
0
        public void Test_CCVPercentPalette_ChooseColour_NullOverrideTarget()
        {
            var palette = new CCVPercentPalette();

            palette.Should().NotBeNull();

            palette.AbsoluteTargetCMV = CellPassConsts.NullCCV;
            palette.AbsoluteTargetCMV.Should().Be(CellPassConsts.NullCCV);

            var data   = new SubGridCellPassDataCMVEntryRecord(MEASURED_CMV, TARGET_CMV, 0, 0);
            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.MeasuredCMV = (short)(MEASURED_CMV + i * CMV_INCREMENT);
                palette.ChooseColour(data.MeasuredCMV, TARGET_CMV).Should().Be(colors[i]);
            }
        }