コード例 #1
0
        public void GetElevationAtGeoCoordinate_PassTargetLocationOutsideDataSet_ThrowArgumentOutOfRangeException()
        {
            // Arrange
            ArcSecondResolution resolution = ArcSecondResolution.Three;
            DecimalGeoCoordinate coordinate = new DecimalGeoCoordinate(5, 5);
            int rowLength = ElevationDataConstants.ThreeArcSecondResolutionRowLength;

            DecimalGeoCoordinate targetLocation = new DecimalGeoCoordinate(6.01, 5.5);

            _sut = new ElevationDataSet("", _testElevationData, resolution, coordinate, rowLength);

            // Act
            int elevation = _sut.GetElevationAtCoordinate(targetLocation);

            // Assert
        }
コード例 #2
0
        public void GetElevationAtCoordinate_PassValidGeoCoordinate_ReturnsExpectedElevation()
        {
            // Arrange
            int rowLength = 100;
            List<Int16> data = CreateTestData(rowLength);
            ArcSecondResolution resolution = ArcSecondResolution.Three;
            DecimalGeoCoordinate coordinate = new DecimalGeoCoordinate(5, 5);

            DecimalGeoCoordinate targetLocation = new DecimalGeoCoordinate(5.5, 5.5);

            _sut = new ElevationDataSet("", data, resolution, coordinate, rowLength);

            // Act
            int elevation = _sut.GetElevationAtCoordinate(targetLocation);

            // Assert
            Assert.AreEqual(elevation, 99);
        }