public void RemoveSegmentWithTrailingSlash()
        {
            var url = new UrlBuilder("http://www.shoutem.com/app/nid/");
            url.RemovePathSegment("nid");

            Assert.AreEqual("app/", url.GetPath());
        }
Esempio n. 2
0
        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());
        }
Esempio n. 4
0
        public void AddPathSegment()
        {
            var url = new UrlBuilder("http://www.shoutem.com/app");
            url.AddPathSegment("nid");

            Assert.AreEqual("app/nid", url.GetPath());
        }
Esempio n. 5
0
        public void SetPathToEmpty()
        {
            var url = new UrlBuilder("http://www.shoutem.com/nid");
            url.SetPath(string.Empty);

            Assert.AreEqual(string.Empty, url.GetPath());
        }
Esempio n. 6
0
        public void SetPathToNull()
        {
            var url = new UrlBuilder("http://www.shoutem.com/");
            url.SetPath(null);

            Assert.AreEqual(null, url.GetPath());
        }
Esempio n. 7
0
        public void DefaultPath()
        {
            var url = new UrlBuilder("http://www.shoutem.com/app");

            Assert.AreEqual("app", url.GetPath());
        }
Esempio n. 8
0
        public void DefaultPathWithoutUrl()
        {
            var url = new UrlBuilder();

            Assert.AreEqual(string.Empty, url.GetPath());
        }