public void AddPathSegment() { var url = new UrlBuilder("http://www.shoutem.com/app"); url.AddPathSegment("nid"); Assert.AreEqual("app/nid", url.GetPath()); }
public void SetTrailingSlash() { var url = new UrlBuilder("http://www.shoutem.com/nid"); url.AddPathSegment("/"); Assert.AreEqual("http://www.shoutem.com/nid/", url.ToString()); }
public void TestToString() { var url = new UrlBuilder("http://www.shoutem.local/app"); url.SetHost("www.shoutem.com"); url.SetScheme(Uri.UriSchemeHttps); url.AddPathSegment("test"); url.SetQueryParam("nid", 123); url.AppendQueryParam("nid", 321); Assert.AreEqual("https://www.shoutem.com/app/test?nid=123&nid=321", url.ToString()); }