Example #1
0
        public void ResolveWebserviceTest()
        {
            Webserver server = new Webserver();
            server.Bind("http://+:80/Temporary_Listen_Addresses/FortAwesomeUtil.test/base/");
            var dummy1 = new DummyWebservice();
            server.RegisterWebservice("foo1/", dummy1);
            var dummy2 = new DummyWebservice();
            server.RegisterWebservice("foo2/a/", dummy2);
            server.RegisterWebservice("foo2/b/", dummy2);
            server.Start();

            string url = "http://127.0.0.1:80/Temporary_Listen_Addresses/FortAwesomeUtil.test/base/foo2/a/basic/";
            Webservice expected = dummy1; // TODO: Initialize to an appropriate value
            Webservice actual;
            actual = server.ResolveWebservice(url);
            Assert.AreEqual(expected, actual);
        }
Example #2
0
        public void ResolveWebserviceTest()
        {
            Webserver server = new Webserver();

            server.Bind("http://+:80/Temporary_Listen_Addresses/FortAwesomeUtil.test/base/");
            var dummy1 = new DummyWebservice();

            server.RegisterWebservice("foo1/", dummy1);
            var dummy2 = new DummyWebservice();

            server.RegisterWebservice("foo2/a/", dummy2);
            server.RegisterWebservice("foo2/b/", dummy2);
            server.Start();

            string     url      = "http://127.0.0.1:80/Temporary_Listen_Addresses/FortAwesomeUtil.test/base/foo2/a/basic/";
            Webservice expected = dummy1; // TODO: Initialize to an appropriate value
            Webservice actual;

            actual = server.ResolveWebservice(url);
            Assert.AreEqual(expected, actual);
        }