public void GeocodingWhenAddressAndLocationIsNullTest() { var request = new GeocodingRequest(); var exception = Assert.Throws <ArgumentException>(() => { var parameters = request.GetQueryStringParameters(); Assert.IsNull(parameters); }); Assert.IsNotNull(exception); Assert.AreEqual(exception.Message, "Location, PlaceId or Address is required"); }
public void GeocodingWhenPlaceIdAndKeyIsNullTest() { var request = new GeocodingRequest { PlaceId = "test" }; var exception = Assert.Throws <ArgumentException>(() => { var parameters = request.GetQueryStringParameters(); Assert.IsNull(parameters); }); Assert.IsNotNull(exception); Assert.AreEqual(exception.Message, "Key is required, when using PlaceId"); }