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)); }
public string ToAppRelative(string virtualPath, Store store, Language language) { return(_urlBuilder.BuildStoreUrl(_urlBuilderContext, virtualPath, store.ToToolsStore(), language?.CultureName)); }
public void When_StoreIsNullAndLanguageIsNull_Expect_VirtualRoot() { var result = _builder.BuildStoreUrl(_context, "/", null, null); Assert.Equal("~/", result); }
public void When_CurrentStoreAndCurrentLanguage_Expect_InsecureUrlAndCurrentLanguage() { var result = _builder.BuildStoreUrl(_context, "/"); Assert.Equal("http://localhost/insecure1/en-US/", result); }
public void When_VirtualPathIsNull_Expect_Null() { var result = _builder.BuildStoreUrl(_context, null); Assert.Null(result); }