public void InitializeTest()
        {
            EducationContext = new EducationDataContext();
            Container        = AssemblySetup.CreateWindsorContainer(EducationContext);
            RepositoryContainer repositoryContainer = new RepositoryContainer(Container, EducationContext);

            Target = new AgreementManager(repositoryContainer);
        }
Exemple #2
0
        public void InitializeTest()
        {
            EducationContext = new EducationDataContext();
            Container        = AssemblySetup.CreateWindsorContainer(EducationContext);
            RepositoryContainer repositoryContainer = new RepositoryContainer(Container, EducationContext);

            Target = new ProgramManager(repositoryContainer, new DataTableBinder());
        }
Exemple #3
0
        public void InitializeTest()
        {
            EducationContext = new EducationDataContext();
            Container        = AssemblySetup.CreateWindsorContainer(EducationContext);
            RepositoryContainer repositoryContainer = new RepositoryContainer(Container, EducationContext);

            Target = new PrivateHealthFieldManager(repositoryContainer, MockRepository.GenerateMock <IBlobClient>(), new DataTableBinder(), new UserAuditor());
        }
Exemple #4
0
        public void TestInitialize()
        {
            EducationContext = new EducationDataContext();
            Container        = AssemblySetup.CreateWindsorContainer(EducationContext);
            RepositoryContainer repositoryContainer = new RepositoryContainer(Container, EducationContext);

            Target = new ServiceOfferingManager(repositoryContainer, new DataTableBinder());
            User   = new EducationSecurityPrincipal(new UserRepository(EducationContext).Items.Where(s => s.UserKey == "Bob").Include("UserRoles.Role").Single());
        }
Exemple #5
0
 public void InitializeTest()
 {
     EducationContext = new EducationDataContext();
     Container = AssemblySetup.CreateWindsorContainer(EducationContext);
     RepositoryContainer repositoryContainer = new RepositoryContainer(Container, EducationContext);
     Target = new SchoolDistrictManager(repositoryContainer, new DataTableBinder(), new UserAuditor());
     User = new EducationSecurityPrincipal(EducationContext.Users.Include("UserRoles.Role").Single(u => u.UserKey == "Bob"));
     MockContext = MockHttpContextFactory.Create();
 }
Exemple #6
0
        public void InitializeTest()
        {
            EducationContext = new EducationDataContext();
            Container        = AssemblySetup.CreateWindsorContainer(EducationContext);
            User             = new EducationSecurityPrincipal(EducationContext.Users.Include("UserRoles.Role").Include(u => u.PrivateHealthDataViewEvents).Single(u => u.Id == 1));
            RepositoryContainer repositoryContainer = new RepositoryContainer(Container, EducationContext);

            Target = new PublicFieldManager(repositoryContainer, MockRepository.GenerateMock <IBlobClient>(), new DataTableBinder(), new UserAuditor());
        }
        public void InitializeTest()
        {
            EducationContext = new EducationDataContext();
            Container        = AssemblySetup.CreateWindsorContainer(EducationContext);
            RepositoryContainer repositoryContainer = new RepositoryContainer(Container, EducationContext);
            ProviderManager     providerManager     = new ProviderManager(repositoryContainer, new DataTableBinder());
            ProgramManager      programManager      = new ProgramManager(repositoryContainer, new DataTableBinder());
            ServiceTypeManager  serviceTypeManager  = new ServiceTypeManager(repositoryContainer, new DataTableBinder());

            Target = new PartnersController(providerManager, programManager, serviceTypeManager);
        }
        public void TestInitialize()
        {
            EducationContext = new EducationDataContext();
            Container        = AssemblySetup.CreateWindsorContainer(EducationContext);
            RepositoryContainer     repositoryContainer = new RepositoryContainer(Container, EducationContext);
            ScheduledServiceManager logicManager        = new ScheduledServiceManager(repositoryContainer);
            HttpContext             context             = new HttpContext(new HttpRequest("", "http://tempuri.org", ""), new HttpResponse(new StringWriter()));

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

            Target.ControllerContext = controllerContext;
        }
Exemple #9
0
        public void InitializeTest()
        {
            EducationContext = new EducationDataContext();
            Container        = AssemblySetup.CreateWindsorContainer(EducationContext);
            RepositoryContainer   repositoryContainer = new RepositoryContainer(Container, EducationContext);
            SchoolDistrictManager logicManager        = new SchoolDistrictManager(repositoryContainer, new DataTableBinder(), new UserAuditor());

            Target = new StudentController(logicManager);
            User userEntity = EducationContext.Users.Include("UserRoles.Role").Include("UserRoles.Schools").Include("UserRoles.Providers").Single(s => s.UserKey == "Bob");

            User            = new EducationSecurityPrincipal(userEntity);
            MockHttpContext = MockHttpContextFactory.Create();
            MockHttpContext.Expect(m => m.User).Return(User);
            ControllerContext context = new ControllerContext(MockHttpContext, new RouteData(), Target);

            Target.ControllerContext = context;
        }
        public void TestInitialize()
        {
            EducationContext = new EducationDataContext();
            Container        = AssemblySetup.CreateWindsorContainer(EducationContext);
            RepositoryContainer    repositoryContainer = new RepositoryContainer(Container, EducationContext);
            ServiceOfferingManager logicManager        = new ServiceOfferingManager(repositoryContainer, new DataTableBinder());
            ServiceTypeManager     serviceTypeManager  = new ServiceTypeManager(repositoryContainer, new DataTableBinder());
            ProviderManager        providerManager     = new ProviderManager(repositoryContainer, new DataTableBinder());
            ProgramManager         programManager      = new ProgramManager(repositoryContainer, new DataTableBinder());
            HttpContext            context             = new HttpContext(new HttpRequest("", "http://tempuri.org", ""), new HttpResponse(new StringWriter()));
            User userEntity = EducationContext.Users.Include("UserRoles.Role").Include("UserRoles.Schools").Include("UserRoles.Providers").Single(s => s.UserKey == "Bob");

            User         = new EducationSecurityPrincipal(userEntity);
            context.User = User;
            Target       = new ServiceOfferingController(logicManager, serviceTypeManager, providerManager, programManager, MockRepository.GenerateMock <IFileProcessor>());
            ControllerContext controllerContext = new ControllerContext(new HttpContextWrapper(context), new RouteData(), Target);

            Target.ControllerContext = controllerContext;
        }
 public void InitializeTest()
 {
     EducationContext = new EducationDataContext();
     Container        = AssemblySetup.CreateWindsorContainer(EducationContext);
     Target           = new AccountManager(Container, new EmailConfirmationManager(new Mailer()), new DataTableBinder(), new UserAuditor());
 }