public void BaseUrl() { var key = Guid.NewGuid().ToString(); var data = "/company/" + key; Assert.AreEqual <string>(data, CompanyCore.BaseUrl(key)); }
public static string RelativeLink(this SearchResult result) { switch (result.Type) { case Reference.ItemRequest: return(ItemRequestCore.BaseUrl(result.Key)); case Reference.Item: return(ItemCore.BaseUrl(result.Key)); case Reference.User: return(ProfileCore.BaseUrl(result.Key)); case Reference.Company: return(CompanyCore.BaseUrl(result.Key)); default: throw new InvalidOperationException("unkown type"); } }
public void BaseUrlNull() { var data = "/company/"; Assert.AreEqual <string>(data, CompanyCore.BaseUrl(null)); }