public void GetScript_ReplacesApplicationPath() { var handler = new DummyServerContextHandler(); handler.GetRawScriptOverride = () => "var appPath = '{{applicationPath}}';"; handler.GetApplicationPathOverride = () => "/myApp/"; var result = handler.PublicGetScript(); Assert.AreEqual("var appPath = '/myApp/';", result); }
public void GetScript_ReplacesApplicationPath() { var handler = new DummyServerContextHandler(); handler.GetRawScriptOverride = () => "var appPath = '{{applicationPath}}';"; handler.GetApplicationPathOverride = () => "/myApp/"; handler.GetCurrentSiteIdOverride = () => Guid.NewGuid(); handler.GetCacheManagerOverride = () => new DummyCacheManager(); handler.GetFrontendLanguagesOverride = () => @"[""en"", ""de""]"; handler.GetCacheDependencyOverride = (key) => new SlidingTime(TimeSpan.FromMinutes(60)); var result = handler.PublicGetScript(); Assert.AreEqual("var appPath = '/myApp/';", result); }