public Functions( StorageOptions storageOptions, IEventLogger customLogger, [KeyFilter(Filenames.BadSicLog)] IAuditLogger badSicLog, [KeyFilter(Filenames.ManualChangeLog)] IAuditLogger manualChangeLog, IMessenger messenger, ISharedBusinessLogic sharedBusinessLogic, ISearchRepository <EmployerSearchModel> employerSearchRepository, ISearchRepository <SicCodeSearchModel> sicCodeSearchRepository, ISubmissionBusinessLogic submissionBusinessLogic, IOrganisationBusinessLogic organisationBusinessLogic, ISearchBusinessLogic searchBusinessLogic, IGovNotifyAPI govNotifyApi, UpdateFromCompaniesHouseService updateFromCompaniesHouseService, IAuthorisationBusinessLogic authorisationBusinessLogic) { _StorageOptions = storageOptions; _CustomLogger = customLogger; _BadSicLog = badSicLog; _ManualChangeLog = manualChangeLog; _Messenger = messenger; _SharedBusinessLogic = sharedBusinessLogic; _EmployerSearchRepository = employerSearchRepository; _SicCodeSearchRepository = sicCodeSearchRepository; _SubmissionBusinessLogic = submissionBusinessLogic; _OrganisationBusinessLogic = organisationBusinessLogic; SearchBusinessLogic = searchBusinessLogic; _updateFromCompaniesHouseService = updateFromCompaniesHouseService; _authorisationBusinessLogic = authorisationBusinessLogic; this.govNotifyApi = govNotifyApi; }
public RegistrationService( [KeyFilter(Filenames.BadSicLog)] IAuditLogger badSicLog, [KeyFilter(Filenames.RegistrationLog)] IAuditLogger registrationLog, IRegistrationBusinessLogic registrationBusinessLogic, IScopeBusinessLogic scopeBL, IOrganisationBusinessLogic orgBL, ISharedBusinessLogic sharedBusinessLogic, ISearchBusinessLogic searchBusinessLogic, IUserRepository userRepository, IPinInThePostService pinInThePostService, IPostcodeChecker postcodeChecker, [KeyFilter("Private")] IPagedRepository <EmployerRecord> privateSectorRepository, [KeyFilter("Public")] IPagedRepository <EmployerRecord> publicSectorRepository ) { RegistrationBusinessLogic = registrationBusinessLogic; BadSicLog = badSicLog; RegistrationLog = registrationLog; ScopeBusinessLogic = scopeBL; OrganisationBusinessLogic = orgBL; SharedBusinessLogic = sharedBusinessLogic; SearchBusinessLogic = searchBusinessLogic; PrivateSectorRepository = privateSectorRepository; PublicSectorRepository = publicSectorRepository; UserRepository = userRepository; PinInThePostService = pinInThePostService; PostcodeChecker = postcodeChecker; }
public void BeforeEach() { mockDataRepo = MoqHelpers.CreateMockDataRepository(); ; mockFileRepo = new Mock <IFileRepository>(); testSearchBL = new SearchBusinessLogic(testSearchRepo, Mock.Of <ISearchRepository <SicCodeSearchModel> >(), Mock.Of <IAuditLogger>()); // setup mocks ans ensures they call their implementations. (We override calls per test when need be!) mockScopeBL = new Mock <ScopeBusinessLogic>(testCommonBL, mockDataRepo.Object, testSearchBL); mockScopeBL.CallBase = true; mockOrganisationBL = new Mock <OrganisationBusinessLogic>( testCommonBL, mockDataRepo.Object, new Mock <ISubmissionBusinessLogic>().Object, new Mock <IScopeBusinessLogic>().Object, new Mock <IEncryptionHandler>().Object, new Mock <ISecurityCodeBusinessLogic>().Object, new Mock <IObfuscator>().Object); mockOrganisationBL.CallBase = true; // service under test testScopePresenter = new ScopePresenter(mockScopeBL.Object, mockDataRepo.Object, mockOrganisationBL.Object, testCommonBL); }
public AdminService( [KeyFilter(Filenames.ManualChangeLog)] IAuditLogger manualChangeLog, [KeyFilter(Filenames.BadSicLog)] IAuditLogger badSicLog, [KeyFilter(Filenames.RegistrationLog)] IAuditLogger registrationLog, IShortCodesRepository shortCodesRepository, IOrganisationBusinessLogic organisationBusinessLogic, ISearchBusinessLogic searchBusinessLogic, ISubmissionBusinessLogic submissionBusinessLogic, IUserRepository userRepository, [KeyFilter(QueueNames.ExecuteWebJob)] IQueue executeWebjobQueue, [KeyFilter("Private")] IPagedRepository <EmployerRecord> privateSectorRepository, [KeyFilter("Public")] IPagedRepository <EmployerRecord> publicSectorRepository, ISearchRepository <EmployerSearchModel> employerSearchRepository, ISearchRepository <SicCodeSearchModel> sicCodeSearchRepository, ISharedBusinessLogic sharedBusinessLogic ) { ManualChangeLog = manualChangeLog; BadSicLog = badSicLog; RegistrationLog = registrationLog; ShortCodesRepository = shortCodesRepository; OrganisationBusinessLogic = organisationBusinessLogic; SearchBusinessLogic = searchBusinessLogic; SubmissionBusinessLogic = submissionBusinessLogic; UserRepository = userRepository; ExecuteWebjobQueue = executeWebjobQueue; PrivateSectorRepository = privateSectorRepository; PublicSectorRepository = publicSectorRepository; EmployerSearchRepository = employerSearchRepository; SicCodeSearchRepository = sicCodeSearchRepository; SharedBusinessLogic = sharedBusinessLogic; }
public void BeforeEach() { mockDataRepo = new Mock<IDataRepository>(); mockFileRepo = new Mock<IFileRepository>(); testSearchBL = new SearchBusinessLogic(testEmployerSearchRepo,Mock.Of<ISearchRepository<SicCodeSearchModel>>(),Mock.Of<IAuditLogger>()); testScopeBL = new ScopeBusinessLogic(testCommonBL, mockDataRepo.Object, testSearchBL,null); GenerateTestData(); }
public ViewingService(ISharedBusinessLogic sharedBusinessLogic, IOrganisationBusinessLogic organisationBusinessLogic, ISearchBusinessLogic searchBusinessLogic, ISubmissionBusinessLogic submissionBusinessLogic) { SharedBusinessLogic = sharedBusinessLogic; OrganisationBusinessLogic = organisationBusinessLogic; SearchBusinessLogic = searchBusinessLogic; SubmissionBusinessLogic = submissionBusinessLogic; }
public ScopePresenter(IScopeBusinessLogic scopeBL, IDataRepository dataRepo, IOrganisationBusinessLogic organisationBusinessLogic, ISearchBusinessLogic searchBusinessLogic, ISharedBusinessLogic sharedBusinessLogic) { ScopeBusinessLogic = scopeBL; DataRepository = dataRepo; _organisationBusinessLogic = organisationBusinessLogic; _searchBusinessLogic = searchBusinessLogic; _sharedBusinessLogic = sharedBusinessLogic; }