public void RemoveSegmentWithTrailingSlash() { var url = new UrlBuilder("http://www.shoutem.com/app/nid/"); url.RemovePathSegment("nid"); Assert.AreEqual("app/", url.GetPath()); }
public void RemovePathSegment() { var url = new UrlBuilder("http://www.shoutem.com/app"); url.RemovePathSegment("app"); Assert.AreEqual(string.Empty, url.GetPath()); }
public void SetPathWithTrailingSlash() { var url = new UrlBuilder("http://www.shoutem.com/nid"); url.SetPath("app/nid/"); Assert.AreEqual("app/nid/", url.GetPath()); }
public void AddPathSegment() { var url = new UrlBuilder("http://www.shoutem.com/app"); url.AddPathSegment("nid"); Assert.AreEqual("app/nid", url.GetPath()); }
public void SetPathToEmpty() { var url = new UrlBuilder("http://www.shoutem.com/nid"); url.SetPath(string.Empty); Assert.AreEqual(string.Empty, url.GetPath()); }
public void SetPathToNull() { var url = new UrlBuilder("http://www.shoutem.com/"); url.SetPath(null); Assert.AreEqual(null, url.GetPath()); }
public void DefaultPath() { var url = new UrlBuilder("http://www.shoutem.com/app"); Assert.AreEqual("app", url.GetPath()); }
public void DefaultPathWithoutUrl() { var url = new UrlBuilder(); Assert.AreEqual(string.Empty, url.GetPath()); }