public void PolarToCartesianNullRequestTest() { var response = GeometryService.PolarToCartesian(null); Assert.IsNotNull(response, "Response should never be null"); Assert.IsFalse(response.Success, "Response.Success should be [False] since a null request was supplied"); }
public void PolarToCartesianNullAngleTest() { var request = new PolarCoordinates { DistanceFromOrigin = 13 }; var response = GeometryService.PolarToCartesian(request); Assert.IsNotNull(response, "Response should never be null"); Assert.IsFalse(response.Success, "Response.Success should be [False] since an invalid request was supplied"); }
public void PolarToCartesianOriginTest() { var request = new PolarCoordinates { Angle = 0, DistanceFromOrigin = 0 }; var response = GeometryService.PolarToCartesian(request); Assert.IsNotNull(response, "Response should never be null"); Assert.IsTrue(response.Success, "Response.Success should be true!"); Assert.IsNotNull(response.Value, "The [Value] property of the Response object should not be null"); Assert.IsNotNull(response.Value.XLocation, "X Location should not be null"); Assert.IsNotNull(response.Value.YLocation, "Y Location should not be null"); Assert.AreEqual(0, response.Value.XLocation.Value, 0.001, "X Location is incorrect"); Assert.AreEqual(0, response.Value.YLocation.Value, 0.001, "Y Location is incorrect"); }