public void SetPathToEmpty() { var url = new UrlBuilder("http://www.shoutem.com/nid/"); url.SetPath(string.Empty); Assert.AreEqual("http://www.shoutem.com/", url.ToString()); }
public void SetTrailingSlash() { var url = new UrlBuilder("http://www.shoutem.com/nid"); url.AddPathSegment("/"); Assert.AreEqual("http://www.shoutem.com/nid/", url.ToString()); }
/// <summary> /// Constructs a UrlBuilder object from a urlBuilder. /// </summary> /// <param name="urlBuilder">The urlBuilder to use as a starting point (required)</param> public UrlBuilder(UrlBuilder urlBuilder) { if (urlBuilder == null) { throw new ArgumentNullException("urlBuilder"); } Initialize(urlBuilder.ToString()); }
public void UrlBuilderWithTrailingSlash() { var url = new UrlBuilder("http://www.shoutem.com/nid/"); Assert.AreEqual("http://www.shoutem.com/nid/", url.ToString()); }
public void DefaultQueryParam() { var url = new UrlBuilder(); Assert.AreEqual("http://localhost/", url.ToString()); }