Example #1
0
        public void Test_NullCells()
        {
            var cell = new SubGridCellCompositeHeightsRecord();

            cell.Clear();

            var clientGrid = ClientLeafSubGridFactoryFactory.CreateClientSubGridFactory().GetSubGrid(GridDataType.CompositeHeights) as ClientCompositeHeightsLeafSubgrid;

            SubGridUtilities.SubGridDimensionalIterator((x, y) => Assert.True(clientGrid.Cells[x, y].Equals(cell)));
        }
Example #2
0
        public void Test_SubGridCellCompositeHeightsRecord_Creation()
        {
            SubGridCellCompositeHeightsRecord rec = new SubGridCellCompositeHeightsRecord();

            rec.Clear();

            Assert.True(rec.FirstHeight == Consts.NullHeight);
            Assert.True(rec.LastHeight == Consts.NullHeight);
            Assert.True(rec.LowestHeight == Consts.NullHeight);
            Assert.True(rec.HighestHeight == Consts.NullHeight);

            var minTicks = Consts.MIN_DATETIME_AS_UTC.Ticks;

            Assert.True(rec.FirstHeightTime == minTicks);
            Assert.True(rec.LastHeightTime == minTicks);
            Assert.True(rec.LowestHeightTime == minTicks);
            Assert.True(rec.HighestHeightTime == minTicks);
        }
Example #3
0
        public void SetHeightsToNull()
        {
            var clientGrid   = TestSubGrid();
            var nonNullValue = new SubGridCellCompositeHeightsRecord
            {
                LastHeight    = 12.3f,
                HighestHeight = 23.4f,
                LowestHeight  = 34.5f,
                FirstHeight   = 45.6f
            };

            SubGridUtilities.SubGridDimensionalIterator((x, y) => clientGrid.Cells[x, y] = nonNullValue);

            clientGrid.SetHeightsToNull();

            SubGridUtilities.SubGridDimensionalIterator((x, y) =>
            {
                clientGrid.Cells[x, y].LastHeight    = CellPassConsts.NullHeight;
                clientGrid.Cells[x, y].HighestHeight = CellPassConsts.NullHeight;
                clientGrid.Cells[x, y].LowestHeight  = CellPassConsts.NullHeight;
                clientGrid.Cells[x, y].FirstHeight   = CellPassConsts.NullHeight;
            });
        }