public void GetUri_WhiteSpaceAllOver() { System.Uri baseUri = new System.Uri("http://www.google.com"); IUrlService service = new DefaultUrlService(baseUri, null); Assert.AreEqual(new System.Uri("http://www.google.com/RelativePath/Path"), service.GetUri(" RelativePath/Path "), @" The GetUri method should take in a path and append it to the end of the base Url. If the path has a preceeding slash or not, it shouldn't matter. "); }
public void GetUri_NullPath() { System.Uri baseUri = new System.Uri("http://www.google.com"); IUrlService service = new DefaultUrlService(baseUri, null); Assert.AreEqual(new System.Uri("http://www.google.com"), service.GetUri(null), @" The GetUri method should take in a path and append it to the end of the base Url. If null is passed in for the path, then the Base Uri should be returned. "); }