Ejemplo n.º 1
0
        public void Test_ToRelative()
        {
            string url = "http://www.Test.com/Folder1/folder2/file.html";

            string applicationPath = "http://www.test.com/folder1/";

            string expected = "/folder2/file.html";

            UrlConverter converter = new UrlConverter(applicationPath);

            converter.Protocol = "http";
            converter.Host     = "localhost";

            string result = converter.ToRelative(url);

            Assert.AreEqual(expected, result, "Doesn't match.");
        }
Ejemplo n.º 2
0
        public void Test_ToRelative()
        {
            string url = "http://www.Test.com/Folder1/folder2/file.html";

            string applicationPath = "http://www.test.com/folder1/";

            string expected = "/folder2/file.html";

            UrlConverter converter = new UrlConverter(applicationPath);
            converter.Protocol = "http";
            converter.Host = "localhost";

            string result = converter.ToRelative(url);

            Assert.AreEqual(expected, result, "Doesn't match.");
        }