public void GetItmCoordinates_ShouldConvertToNorthEast() { var northEast = new Coordinate { Y = 656336, X = 200138 }; _itmGridController = new ItmGridController(new ItmWgs84MathTransfromFactory()); var response = _itmGridController.GetItmCoordinates(32, 35); Assert.AreEqual(northEast.X, response.East); Assert.AreEqual(northEast.Y, response.North); }
public void GetItmCoordinates_ShouldConvertToNorthEast() { var northEast = new Coordinate { Y = 3, X = 4 }; var converter = Substitute.For <IMathTransform>(); converter.Inverse().Returns(converter); converter.Transform(Arg.Any <Coordinate>()).Returns(northEast); _itmGridController = new ItmGridController(converter); var response = _itmGridController.GetItmCoordinates(1, 2); Assert.AreEqual(northEast.X, response.East); Assert.AreEqual(northEast.Y, response.North); }