Exemple #1
0
        public void BaseUrl()
        {
            var key  = Guid.NewGuid().ToString();
            var data = "/company/" + key;

            Assert.AreEqual <string>(data, CompanyCore.BaseUrl(key));
        }
Exemple #2
0
        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");
            }
        }
Exemple #3
0
        public void BaseUrlNull()
        {
            var data = "/company/";

            Assert.AreEqual <string>(data, CompanyCore.BaseUrl(null));
        }