Exemple #1
0
    public void EnsureApplicationMainUrl(AspNetCoreHostingEnvironment sut)
    {
        var url = new Uri("http://localhost:5000");

        sut.EnsureApplicationMainUrl(url);
        Assert.AreEqual(sut.ApplicationMainUrl, url);
    }
        public void Umbraco_Mvc_Area(
            string path,
            string rootPath,
            string outcome,
            [Frozen] IOptionsMonitor <HostingSettings> hostingSettings,
            AspNetCoreHostingEnvironment hostingEnvironment)
        {
            hostingSettings.CurrentValue.ApplicationVirtualPath = rootPath;

            var globalSettings = new GlobalSettings {
                UmbracoPath = path
            };

            Assert.AreEqual(outcome, globalSettings.GetUmbracoMvcAreaNoCache(hostingEnvironment));
        }
Exemple #3
0
 public void IOHelper_ResolveUrl(string input, string expected, Type expectedExceptionType, AspNetCoreHostingEnvironment sut)
 {
     if (expectedExceptionType != null)
     {
         Assert.Throws(expectedExceptionType, () => sut.ToAbsolute(input));
     }
     else
     {
         var result = sut.ToAbsolute(input);
         Assert.AreEqual(expected, result);
     }
 }