示例#1
0
        public void LeftSidePath_FromRightAbsolutPath()
        {
            PathTransformer pathTransformer = new PathTransformer("http://somedomain/", "http://egoratest/somedomain/");
            string          newPath         = pathTransformer.AdjustPath("/page1.html");

            Assert.IsNotNull(newPath);
            Assert.AreEqual("http://egoratest/somedomain/page1.html", newPath);
        }
示例#2
0
        public void LeftSidePath_FromRightAbsolutPathAndNoRootProxyPath()
        {
            PathTransformer pathTransformer = new PathTransformer("https://www.fundamt.gv.at/gondor/",
                                                                  "http://egoratest/stammportal/fundamt/");
            string newPath = pathTransformer.AdjustPath("/gondor/WebGov/UI/Security/FormsLogin.aspx");

            Assert.IsNotNull(newPath);
            Assert.AreEqual("http://egoratest/stammportal/fundamt/WebGov/UI/Security/FormsLogin.aspx", newPath);
        }
示例#3
0
        public void LocationHeaderTest2()
        {
            string location =
                "http://localhost:9090/fkb2local/views/client.api.DatenImportierenLandesIT.jsf?FT=X";
            string expectedLaoction = location;

            PathTransformer transformer = new PathTransformer("https://pvawp.bmi.gv.at/bmi.gv.at/fk2web-t/", "/bmi.gv.at/fk2web-t/blabla.jsp");

            Assert.AreEqual(expectedLaoction, transformer.AdjustPath(location));
        }
示例#4
0
        public void LeftSidePath_FromRightAbsolutPathAndApplicationAsSubdir()
        {
            PathTransformer pathTransformer =
                new PathTransformer("https://awp.statistik.at/statistik.at/vis.test.extern/",
                                    "/statistik.at/vis.test.extern/");
            string newPath = pathTransformer.AdjustPath("https://awp.statistik.at/statistik.at/vis.test.extern/start.do");

            Assert.IsNotNull(newPath);
            Assert.AreEqual("/statistik.at/vis.test.extern/start.do", newPath);
        }
示例#5
0
        public void LocationHeaderTest()
        {
            string location =
                "http://localhost:9090/fkb2local/views/client.api.DatenImportierenLandesIT.jsf?FT=X";

            PathTransformer transformer = new PathTransformer("http://localhost:9090/fkb2local/", "/bmi.gv.at/fk2web-t/");

            Assert.AreEqual("/bmi.gv.at/fk2web-t/views/client.api.DatenImportierenLandesIT.jsf?FT=X", transformer.AdjustPath(location));
        }