public void SetUp()
 {
     environment = new Dictionary <string, object>();
     headers     = new Dictionary <string, string[]>();
     environment.Add(OwinConstants.RequestHeadersKey, headers);
     environment.Add(OwinConstants.RequestSchemeKey, "https");
     setHeader("Host", "localhost");
     request = new OwinCurrentHttpRequest(environment);
 }
 public void SetUp()
 {
     environment                 = new Environment();
     environment.Headers         = new Dictionary <string, string>();
     environment.Scheme          = "https";
     environment.Headers["Host"] = "localhost";
     body    = new OwinRequestBody(environment);
     request = new OwinCurrentHttpRequest(body);
 }
 public void SetUp()
 {
     environment = new Dictionary<string, object>();
     headers = new Dictionary<string, string[]>();
     environment.Add(OwinConstants.RequestHeadersKey, headers);
     environment.Add(OwinConstants.RequestSchemeKey, "https");
     setHeader("Host", "localhost");
     request = new OwinCurrentHttpRequest(environment);
 }
 public void SetUp()
 {
     environment = new Environment();
     environment.Headers = new Dictionary<string, string>();
     environment.Scheme = "https";
     environment.Headers["Host"] = "localhost";
     body = new OwinRequestBody(environment);
     request = new OwinCurrentHttpRequest(body);
 }
        public void SetUp()
        {
            headers = new Dictionary<string, string[]>();

            var dict = new Dictionary<string, object>();
            dict.Add(OwinConstants.RequestHeadersKey, headers);

            request = new OwinCurrentHttpRequest(dict);
        }
Exemplo n.º 6
0
        public void SetUp()
        {
            headers = new Dictionary <string, string[]>();

            var dict = new Dictionary <string, object>();

            dict.Add(OwinConstants.RequestHeadersKey, headers);

            request = new OwinCurrentHttpRequest(dict);
        }
Exemplo n.º 7
0
        public void HttpMethodMatchesAny()
        {
            var request = new OwinCurrentHttpRequest().HttpMethod("POST");

            request.HttpMethodMatchesAny("get", "put").ShouldBeFalse();
            request.HttpMethodMatchesAny("get").ShouldBeFalse();
            request.HttpMethodMatchesAny("head", "PUT").ShouldBeFalse();

            request.HttpMethodMatchesAny("POST").ShouldBeTrue();
            request.HttpMethodMatchesAny("POST", "get").ShouldBeTrue();
            request.HttpMethodMatchesAny("post", "get").ShouldBeTrue();
            request.HttpMethodMatchesAny("Post", "get").ShouldBeTrue();
        }
Exemplo n.º 8
0
 public void SetUp()
 {
     theRequest    = new OwinCurrentHttpRequest();
     theWriter     = new OwinHttpWriter(theRequest.Environment);
     theMiddleware = new StaticFileMiddleware(null, theFiles, new OwinSettings());
 }