public void Setup() { _transactionScope = new TransactionScope(); _zipFileRepository = new ZipFileRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString); _manCoRepository = new ManCoRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString); _manCo = BuildMeA.ManCo("description", "code"); _manCo2 = BuildMeA.ManCo("description2", "code2"); _manCo3 = BuildMeA.ManCo("description3", "code3"); }
public void Setup() { _transactionScope = new TransactionScope(); _applicationUserRepository = new ApplicationUserRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString); _manCoRepository = new ManCoRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString); _domicileRepository = new DomicileRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString); _roleAdmin = BuildMeA.IdentityRole("TestAdmin"); _roleStandard = BuildMeA.IdentityRole("TestStandard"); _domicile1 = BuildMeA.Domicile("code", "description"); _domicile2 = BuildMeA.Domicile("code2", "description2"); _domicile3 = BuildMeA.Domicile("code3", "description3"); _domicile4 = BuildMeA.Domicile("code4", "description4"); _applicationUser = BuildMeA.ApplicationUser("tron"); _applicationUser2 = BuildMeA.ApplicationUser("tron2"); _applicationUser3 = BuildMeA.ApplicationUser("flynn"); _applicationUser4 = BuildMeA.ApplicationUser("flynn2"); _applicationUser.Roles.Add(new IdentityUserRole() { Role = _roleAdmin, RoleId = _roleAdmin.Id, User = _applicationUser, UserId = _applicationUser.Id }); _applicationUser2.Roles.Add(new IdentityUserRole() { Role = _roleStandard, RoleId = _roleStandard.Id, User = _applicationUser2, UserId = _applicationUser2.Id }); _applicationUser3.Roles.Add(new IdentityUserRole() { Role = _roleStandard, RoleId = _roleStandard.Id, User = _applicationUser3, UserId = _applicationUser3.Id }); _applicationUser4.Roles.Add(new IdentityUserRole() { Role = _roleAdmin, RoleId = _roleAdmin.Id, User = _applicationUser4, UserId = _applicationUser4.Id }); _manCo1 = BuildMeA.ManCo("description1", "code1").WithDomicile(_domicile1);; _manCo2 = BuildMeA.ManCo("description2", "code2").WithDomicile(_domicile1);; _manCo3 = BuildMeA.ManCo("description3", "code3").WithDomicile(_domicile1);; _manCo4 = BuildMeA.ManCo("description4", "code4").WithDomicile(_domicile1);; _manCoList = new List <ManCo>(); _domicileList = new List <Domicile>(); }
public void Setup() { _transactionScope = new TransactionScope(); _manCoRepository = new ManCoRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString); _domicileRepository = new DomicileRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString); _applicationUserRepository = new ApplicationUserRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString); _domicile = BuildMeA.Domicile("code", "description"); _domicile2 = BuildMeA.Domicile("code2", "description2"); _manCo1 = BuildMeA.ManCo("description", "code").WithDomicile(_domicile); _manCo2 = BuildMeA.ManCo("description2", "code2").WithDomicile(_domicile); _manCo3 = BuildMeA.ManCo("description3", "code3").WithDomicile(_domicile); _manCo4 = BuildMeA.ManCo("description4", "code4").WithDomicile(_domicile2); _user = BuildMeA.ApplicationUser("warrior"); }
public void Setup() { _transactionScope = new TransactionScope(); _autoApprovalRepository = new AutoApprovalRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString); _docTypeRepository = new DocTypeRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString); _subDocTypeRepository = new SubDocTypeRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString); _manCoRepository = new ManCoRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString); _docType = BuildMeA.DocType("code", "description"); _manCo1 = BuildMeA.ManCo("code1", "description1"); _manCo2 = BuildMeA.ManCo("code2", "description2"); _subDocType1 = BuildMeA.SubDocType("code 1", "description 1").WithDocType(_docType); _subDocType2 = BuildMeA.SubDocType("code 2", "description 3").WithDocType(_docType); _autoApproval = BuildMeA.AutoApproval().WithDocType(_docType).WithSubDocType(_subDocType1).WithManCo(_manCo1); _autoApproval2 = BuildMeA.AutoApproval().WithDocType(_docType).WithSubDocType(_subDocType2).WithManCo(_manCo2); _autoApproval3 = BuildMeA.AutoApproval().WithDocType(_docType).WithSubDocType(_subDocType2).WithManCo(_manCo1); }
private IUserService GetUserService() { var globalSettingsRepository = new GlobalSettingRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString); var applicationUserRepository = new ApplicationUserRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString); var manCoRepository = new ManCoRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString); var passwordHistoryRepository = new PasswordHistoryRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString); var userManagerProvider = new UserManagerProvider(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString); var roleManagerProvider = new RoleManagerProvider(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString); var authenticationManagerProvider = new AuthenticationManagerProvider(new HttpContextBaseProvider()); var sessionRepository = new SessionRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString); return(new UserService( userManagerProvider, roleManagerProvider, authenticationManagerProvider, applicationUserRepository, passwordHistoryRepository, globalSettingsRepository, manCoRepository, sessionRepository)); }
public void Setup() { _transactionScope = new TransactionScope(); _appManCoEmailRepository = new AppManCoEmailRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString); _manCoRepository = new ManCoRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString); _applicationRepository = new ApplicationRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString); _docTypeRepository = new DocTypeRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString); _manCo1 = BuildMeA.ManCo("description", "code"); _manCo2 = BuildMeA.ManCo("description2", "code2"); _application1 = BuildMeA.Application("code", "description"); _docType1 = BuildMeA.DocType("code", "description"); _manCoRepository.Create(_manCo1); _manCoRepository.Create(_manCo2); _applicationRepository.Create(_application1); _docTypeRepository.Create(_docType1); _appManCoEmail = BuildMeA.AppManCoEmail(_application1.Id, _manCo1.Id, _docType1.Id, "accountNumber", "email"); _appManCoEmail2 = BuildMeA.AppManCoEmail(_application1.Id, _manCo2.Id, _docType1.Id, "accountNumber2", "email2"); _appManCoEmail3 = BuildMeA.AppManCoEmail(_application1.Id, _manCo1.Id, _docType1.Id, "accountNumber3", "email3"); _appManCoEmail4 = BuildMeA.AppManCoEmail(_application1.Id, _manCo2.Id, _docType1.Id, "accountNumber4", "email4"); }