Example #1
0
        public void ToAbsolute_HandlesSlashOnVirtualPathRoot()
        {
            var utility = new SelfHostVirtualPathUtility(Environment.CurrentDirectory, "/");

            var result = utility.ToAbsolute("~/js/foo.js");

            Assert.That(result, Is.EqualTo("/js/foo.js"));
        }
Example #2
0
        public void ToAbsolute_NestedVirtualPathRoot_TrailingSlash()
        {
            var utility = new SelfHostVirtualPathUtility(Environment.CurrentDirectory, "/child/app/");

            var result = utility.ToAbsolute("~/js/foo.js");

            Assert.That(result, Is.EqualTo("/child/app/js/foo.js"));
        }
Example #3
0
        public void ToAbsolute_HandlesTrailingSlashOnWebRoot()
        {
            var utility = new SelfHostVirtualPathUtility(Environment.CurrentDirectory + Path.DirectorySeparatorChar, "");

            var result = utility.ToAbsolute("foo.js");

            Assert.That(result, Is.EqualTo("/foo.js"));
        }
        public void ToAbsolute_NestedVirtualPathRoot_TrailingSlash()
        {
            var utility = new SelfHostVirtualPathUtility(Environment.CurrentDirectory, "/child/app/");

            var result = utility.ToAbsolute("~/js/foo.js");

            Assert.That(result, Is.EqualTo("/child/app/js/foo.js"));
        }
        public void ToAbsolute_HandlesTrailingSlashOnWebRoot()
        {
            var utility = new SelfHostVirtualPathUtility(Environment.CurrentDirectory + Path.DirectorySeparatorChar, "");

            var result = utility.ToAbsolute("foo.js");

            Assert.That(result, Is.EqualTo("/foo.js"));
        }
        public void ToAbsolute_HandlesSlashOnVirtualPathRoot()
        {
            var utility = new SelfHostVirtualPathUtility(Environment.CurrentDirectory, "/");

            var result = utility.ToAbsolute("~/js/foo.js");

            Assert.That(result, Is.EqualTo("/js/foo.js"));
        }