Пример #1
0
        public void InitializeTest()
        {
            EducationContext = new EducationDataContext();
            Container        = AssemblySetup.CreateWindsorContainer(EducationContext);
            RepositoryContainer repositoryContainer = new RepositoryContainer(Container, EducationContext);

            Target = new ProgramManager(repositoryContainer, new DataTableBinder());
        }
 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 InitializeTest()
 {
     Target = new ProgramManager(Repositories.MockRepositoryContainer, MockDataTableBinder);
 }
Пример #4
0
 public void InitializeTest()
 {
     Target = new ProgramManager(Repositories.MockRepositoryContainer, MockDataTableBinder);
 }
 public void InitializeTest()
 {
     EducationContext = new EducationDataContext();
     Container = AssemblySetup.CreateWindsorContainer(EducationContext);
     RepositoryContainer repositoryContainer = new RepositoryContainer(Container, EducationContext);
     Target = new ProgramManager(repositoryContainer, new DataTableBinder());
 }
 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;
 }