Beispiel #1
0
        public string ToAppRelative(string virtualPath, Store store, Language language)
        {
            var workContext       = _workContextAccessor.WorkContext;
            var urlBuilderContext = workContext.ToToolsContext();

            return(_urlBuilder.BuildStoreUrl(urlBuilderContext, virtualPath, store.ToToolsStore(), language?.CultureName));
        }
Beispiel #2
0
 public string ToAppRelative(string virtualPath, Store store, Language language)
 {
     return(_urlBuilder.BuildStoreUrl(_urlBuilderContext, virtualPath, store.ToToolsStore(), language?.CultureName));
 }
Beispiel #3
0
        public void When_StoreIsNullAndLanguageIsNull_Expect_VirtualRoot()
        {
            var result = _builder.BuildStoreUrl(_context, "/", null, null);

            Assert.Equal("~/", result);
        }
Beispiel #4
0
        public void When_CurrentStoreAndCurrentLanguage_Expect_InsecureUrlAndCurrentLanguage()
        {
            var result = _builder.BuildStoreUrl(_context, "/");

            Assert.Equal("http://localhost/insecure1/en-US/", result);
        }
Beispiel #5
0
        public void When_VirtualPathIsNull_Expect_Null()
        {
            var result = _builder.BuildStoreUrl(_context, null);

            Assert.Null(result);
        }