public void InitializeTest()
 {
     MockLogicManager         = MockRepository.GenerateMock <IServiceTypeManager>();
     Target                   = new ServiceTypeController(MockLogicManager);
     Target.ControllerContext = new ControllerContext(MockHttpContext, new RouteData(), Target);
     MockHttpContext.Expect(m => m.User).Return(User);
 }
        public void TestInitialize()
        {
            EducationContext = new EducationDataContext();
            Container        = AssemblySetup.CreateWindsorContainer(EducationContext);
            RepositoryContainer repositoryContainer = new RepositoryContainer(Container, EducationContext);

            LogicManager = new ServiceTypeManager(repositoryContainer, new DataTableBinder());
            HttpContext context = new HttpContext(new HttpRequest("", "http://tempuri.org", ""), new HttpResponse(new StringWriter()));

            HttpContext.Current = context;
            User         = new EducationSecurityPrincipal(new UserRepository(EducationContext).Items.Where(s => s.UserKey == "Bob").Single());
            context.User = User;
            Target       = new ServiceTypeController(LogicManager);
            ControllerContext controllerContext = new ControllerContext(new HttpContextWrapper(context), new RouteData(), Target);

            Target.ControllerContext = controllerContext;
        }
 public void InitializeTest()
 {
     MockLogicManager = MockRepository.GenerateMock<IServiceTypeManager>();
     Target = new ServiceTypeController(MockLogicManager);
     Target.ControllerContext = new ControllerContext(MockHttpContext, new RouteData(), Target);
     MockHttpContext.Expect(m => m.User).Return(User);
 }