예제 #1
0
        public void Can_GetLastSegmentFromUrl_WithoutAbsolutePath(string url)
        {
            var uri = new Uri(url);

            string lastSegment = EarlMiniProvider.GetLastSegmentFromUrl(uri);

            Assert.AreEqual(string.Empty, lastSegment);
        }
예제 #2
0
        public void Can_GetLastSegmentFromUrl_WithtAbsolutePath(string url)
        {
            var uri = new Uri(url);

            string lastSegment = EarlMiniProvider.GetLastSegmentFromUrl(uri);

            Assert.IsNotNullOrEmpty(lastSegment);
            Assert.IsTrue(!lastSegment.EndsWith("/"));
            Assert.IsTrue(!lastSegment.Contains("/"));
            Assert.AreEqual(lastSegment, "abcd1234");
        }