public void GetGeoCoordinateForIndex_ValidIndex_ReturnsExpectedGeoCoordinate() { // Arrange ArcSecondResolution resolution = ArcSecondResolution.Three; DecimalGeoCoordinate coordinate = new DecimalGeoCoordinate(5, 5); int rowLength = ElevationDataConstants.ThreeArcSecondResolutionRowLength; _sut = new ElevationDataSet("", _testElevationData, resolution, coordinate, rowLength); // Act DecimalGeoCoordinate geoCoord = _sut.GetGeoCoordinateForIndex(_testElevationData.Count / 2); // Assert Assert.IsTrue(geoCoord.Latitude == 5.5); Assert.IsTrue(geoCoord.Longitude == 5.5); }
public void GetGeoCoordinateForIndex_NegativeIndex_ThrowIndexOutOfRangeException() { // 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 _sut.GetGeoCoordinateForIndex(-1); }