public void GetUriWhenAddressTest() { var request = new PlusCodeGeocodeRequest { Key = "abc", Address = "abc" }; var uri = request.GetUri(); Assert.IsNotNull(uri); Assert.AreEqual($"/api?ekey={request.Key}&language={request.Language.ToCode()}&address={Uri.EscapeDataString(request.Address)}", uri.PathAndQuery); }
public void GetUriWhenLocationTest() { var request = new PlusCodeGeocodeRequest { Key = "abc", Location = new Entities.Common.Location(1, 1) }; var uri = request.GetUri(); Assert.IsNotNull(uri); Assert.AreEqual($"/api?ekey={request.Key}&language={request.Language.ToCode()}&address={Uri.EscapeDataString(request.Location.ToString())}", uri.PathAndQuery); }