Exemple #1
0
        public new static void ClassInitialize()
        {
            TestsConfiguration.ClassInitialize();
            User = TestsDataInitialize.CreateUser(Container.GetInstance <EFDbContext>());
            var httpContextInitialize = new TestsHttpContextInitialize(new Uri("http://john-domain.saaspro.net/"), User,
                                                                       Container.GetInstance <ICustomerHost>());

            HttpContext.Current = httpContextInitialize.GetTestHttpContext();
        }
Exemple #2
0
        public virtual void TestInitialize()
        {
            var httpContextInitialize = new TestsHttpContextInitialize(new Uri("http://john-domain.saaspro.net/"), User,
                                                                       Container.GetInstance <ICustomerHost>());

            if (HttpContext.Current == null)
            {
                HttpContext.Current = httpContextInitialize.GetTestHttpContext();
            }

            Controller.ControllerContext = new ControllerContext(httpContextInitialize.GetTestsHttpContextBase(),
                                                                 new RouteData(), Controller);
        }