示例#1
0
        public async Task Run(TestContext ctx, HttpServer server, CancellationToken cancellationToken)
        {
            var handler = HelloWorldHandler.GetSimple();

            using (var operation = new TraditionalOperation(server, handler, true))
                await operation.Run(ctx, cancellationToken).ConfigureAwait(false);
        }
示例#2
0
        public async Task MartinTest2(TestContext ctx, HttpServer server, CancellationToken cancellationToken)
        {
            var handler     = HelloWorldHandler.GetSimple();
            var authHandler = new AuthenticationHandler(AuthenticationType.NTLM, handler);

            using (var operation = new TraditionalOperation(server, authHandler, true))
                await operation.Run(ctx, cancellationToken).ConfigureAwait(false);
        }
示例#3
0
        public IEnumerable <Handler> GetParameters(TestContext ctx, string filter)
        {
            var list = new List <Handler> ();

            switch (filter)
            {
            case "martin":
                // list.Add (HelloWorldHandler.GetSimple ());
                list.Add(new PostHandler("Normal post", HttpContent.HelloWorld));
                break;

            default:
                list.Add(HelloWorldHandler.GetSimple());
                list.AddRange(TestPost.GetParameters(ctx, filter, HttpServerFlags.Proxy));
                break;
            }
            return(list);
        }