public void Initialize()
        {
            _request1 = new MockRequestInfo("/path1/path2?param=value", "http", "test.com", 80);
            _request2 = new MockRequestInfo("/path1/path2", "https", "secure.test.com", 443);
            _request3 = new MockRequestInfo("/path1/path2/", "http", "test.com", 80);

            _request1.NewPath[1]             = "changed1";
            _request1.NewParameters["param"] = new List <string> {
                "changed"
            };
            _request1.PathChanged();
            _request1.SetServerVariable("PATH_INFO", "/company/news/");
            _request1.SetHeader("HOST", "www.mysite.com");

            _request2.NewPath[2] = "changed2";
            _request2.PathChanged();
            _request2.SetServerVariable("SERVER_PORT", "443");
            _request2.SetHeader("USER_AGENT", "blah blah blah");

            _request3.NewUrlString           = "/changed1/changed2/";
            _request3.NewParameters["param"] = new List <string> {
                "added"
            };
            _request3.ParametersChanged();

            IFactory factory = new NinjectFactory();

            _valueGetter = factory.Create <IValueGetter>();
            _ruleResult  = factory.Create <IRuleResult>();
        }
        public void Initialize()
        {
            _request1 = new MockRequestInfo("/path1/path2/path3?param=value");
            _request2 = new MockRequestInfo("/path1/path2", "https", "secure.test.com", 443);
            _request3 = new MockRequestInfo("/path1/path2/");
            _request4 = new MockRequestInfo("/");

            IFactory factory = new NinjectFactory();
            _deleteAction = factory.Create<IDeleteAction>();
            _ruleResult = factory.Create<IRuleResult>();
        }
示例#3
0
        public void Initialize()
        {
            _request1 = new MockRequestInfo("/path1/path2/path3?p2=v2");
            _request2 = new MockRequestInfo("/path1/path2", "https", "secure.test.com", 443);
            _request3 = new MockRequestInfo("/path1/path2/?p1=v1&p2=v2&p3=v3");
            _request4 = new MockRequestInfo("/?p3=v3&p2=v2");

            IFactory factory = new NinjectFactory();
            _keepAction = factory.Create<IKeepAction>();
            _ruleResult = factory.Create<IRuleResult>();
        }
示例#4
0
        public void Initialize()
        {
            _request1 = new MockRequestInfo("/path1/path2/path3?param=value");
            _request2 = new MockRequestInfo("/path1/path2", "https", "secure.test.com", 443);
            _request3 = new MockRequestInfo("/path1/path2/");
            _request4 = new MockRequestInfo("/");

            IFactory factory = new NinjectFactory();

            _replaceAction = factory.Create <IReplaceAction>();
            _valueGetter   = factory.Create <IValueGetter>().Initialize(Scope.Literal, "NewValue");
            _ruleResult    = factory.Create <IRuleResult>();
        }
示例#5
0
        public void Initialize()
        {
            _request1 = new MockRequestInfo("");
            _request2 = new MockRequestInfo("/");
            _request3 = new MockRequestInfo("/path1");
            _request4 = new MockRequestInfo("path1/");
            _request5 = new MockRequestInfo("path1");
            _request6 = new MockRequestInfo("/path1/path2");
            _request7 = new MockRequestInfo("path1/path2/");
            _request8 = new MockRequestInfo("path1/path2");

            IFactory factory = new NinjectFactory();

            _normalizeAction = factory.Create <INormalizeAction>();
            _ruleResult      = factory.Create <IRuleResult>();
        }