Esempio n. 1
0
        public void Setup()
        {
            var testHandler = new TestHandler();
            var handlers    = new Dictionary <string, IHttpHandler>
            {
                { "/cache/base", new NoOverridesHandler() },
                { "/cache/test", testHandler },
                { "/cache/regex/([a-z]+)/([0-9]+)", testHandler }
            };
            var prefixes = new[] { "http://localhost:44444/cache/", "http://localhost:44444/static/" };

            _server = new CacheRestServer(handlers, prefixes);
            _server.Start();
        }
Esempio n. 2
0
        public void Setup()
        {
            var testHandler = new TestHandler();
            var handlers    = new Dictionary <string, IHttpHandler>()
            {
                { "/cache/test", testHandler }
            };

            _server = new CacheRestServer(handlers, new[]
            {
                "http://localhost:44444/cache/",
                "http://localhost:44444/static/"
            });
            _server.Start();
        }