public void GetDemTileTest()
        {
            int levels = 1;
            PlateFile target = new PlateFile(Path.Combine(TestDataPath, TestDEMPlateFileName), levels);
            MockClasses.MockDemTileLocator locator = new MockClasses.MockDemTileLocator();

            short[] expected = locator.Deserialize(0, 0, 0);
            Stream tileStream = target.GetFileStream(0, 0, 0);
            short[] actual = GetDemTileData(tileStream);

            for (int x = 0; x < 2; x++)
            {
                for (int y = 0; y < 2; y++)
                {
                    tileStream = target.GetFileStream(1, x, y);
                    actual = GetDemTileData(tileStream);
                    expected = locator.Deserialize(1, x, y);
                    Assert.IsTrue(CompareShortArray(expected, actual));
                }
            }
        }
Beispiel #2
0
        public void GetDemTileTest()
        {
            int       levels = 1;
            PlateFile target = new PlateFile(Path.Combine(TestDataPath, TestDEMPlateFileName), levels);

            MockClasses.MockDemTileLocator locator = new MockClasses.MockDemTileLocator();

            short[] expected   = locator.Deserialize(0, 0, 0);
            Stream  tileStream = target.GetFileStream(0, 0, 0);

            short[] actual = GetDemTileData(tileStream);

            for (int x = 0; x < 2; x++)
            {
                for (int y = 0; y < 2; y++)
                {
                    tileStream = target.GetFileStream(1, x, y);
                    actual     = GetDemTileData(tileStream);
                    expected   = locator.Deserialize(1, x, y);
                    Assert.IsTrue(CompareShortArray(expected, actual));
                }
            }
        }