public void Test_SubGridCellPassDataPassCountEntryRecord_CreationWithArgs() { var rec = new SubGridCellPassDataPassCountEntryRecord(123, 456); Assert.True(rec.MeasuredPassCount == 123); Assert.True(rec.TargetPassCount == 456); }
public void Test_SubGridCellPassDataPassCountEntryRecord_CreationDefault() { var rec = new SubGridCellPassDataPassCountEntryRecord(); Assert.True(rec.MeasuredPassCount == 0); Assert.True(rec.TargetPassCount == 0); }
public void Test_PassCountSummaryPalette_ChooseColour_MachineTargetRange() { var palette = new PassCountSummaryPalette(); palette.Should().NotBeNull(); palette.UseMachineTargetPass = true; palette.UseMachineTargetPass.Should().Be(true); var data = new SubGridCellPassDataPassCountEntryRecord(MEASURED_PASS_COUNT, TARGET_PASS_COUNT); var colors = new[] { palette.BelowPassTargetRangeColour, palette.BelowPassTargetRangeColour, palette.BelowPassTargetRangeColour, palette.BelowPassTargetRangeColour, palette.BelowPassTargetRangeColour, palette.BelowPassTargetRangeColour, palette.WithinPassTargetRangeColour, palette.AbovePassTargetRangeColour, palette.AbovePassTargetRangeColour }; for (var i = 0; i < colors.Length; i++) { data.MeasuredPassCount = (ushort)(MEASURED_PASS_COUNT + i * PASS_COUNT_INCREMENT); palette.ChooseColour(data.MeasuredPassCount, data.TargetPassCount, data.TargetPassCount).Should().Be(colors[i]); } }
public void Test_SubGridCellPassDataPassCountEntryRecord_Clear() { var rec = new SubGridCellPassDataPassCountEntryRecord(); rec.Clear(); Assert.True(rec.MeasuredPassCount == CellPassConsts.NullPassCountValue); Assert.True(rec.TargetPassCount == CellPassConsts.NullPassCountValue); }
public void Test_NullCells() { var cell = new SubGridCellPassDataPassCountEntryRecord(); cell.Clear(); var clientGrid = ClientLeafSubGridFactoryFactory.CreateClientSubGridFactory().GetSubGrid(GridDataType.PassCount) as ClientPassCountLeafSubGrid; SubGridUtilities.SubGridDimensionalIterator((x, y) => Assert.True(clientGrid.Cells[x, y].Equals(cell))); }
public void Test_PassCountSummaryPalette_ChooseColour_NullOverrideTargetRange() { var palette = new PassCountSummaryPalette(); palette.Should().NotBeNull(); palette.TargetPassCountRange = new PassCountRangeRecord(CellPassConsts.NullPassCountValue, CellPassConsts.NullPassCountValue); palette.TargetPassCountRange.Min.Should().Be(CellPassConsts.NullPassCountValue); palette.TargetPassCountRange.Max.Should().Be(CellPassConsts.NullPassCountValue); var data = new SubGridCellPassDataPassCountEntryRecord(MEASURED_PASS_COUNT, TARGET_PASS_COUNT); var colors = new[] { Color.Empty, Color.Empty, Color.Empty, Color.Empty, Color.Empty, Color.Empty, Color.Empty, Color.Empty, Color.Empty }; for (var i = 0; i < colors.Length; i++) { data.MeasuredPassCount = (ushort)(MEASURED_PASS_COUNT + i * PASS_COUNT_INCREMENT); palette.ChooseColour(data.MeasuredPassCount, data.TargetPassCount, data.TargetPassCount).Should().Be(colors[i]); } }