public void Can_GetLastSegmentFromUrl_WithoutAbsolutePath(string url) { var uri = new Uri(url); string lastSegment = EarlMiniProvider.GetLastSegmentFromUrl(uri); Assert.AreEqual(string.Empty, lastSegment); }
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"); }