コード例 #1
0
 public void Setup()
 {
     _companyRepository   = MockRepository.GenerateMock <ICompanyRepository>();
     _customerDataAccess  = MockRepository.GenerateMock <ICustomerDataAccess>();
     _clientHelpers       = MockRepository.GenerateMock <IClientHelpers>();
     _creditHelpers       = MockRepository.GenerateMock <ICreditHelpers>();
     _mockCustomerService = new CustomerService(_companyRepository, _customerDataAccess, _clientHelpers, _creditHelpers);
     _dateOfBirth         = new DateTime(1984, 7, 25);
     _yougerDateOfBirth   = new DateTime(1998, 7, 25);
 }
コード例 #2
0
 public CustomerService(ICompanyRepository companyRepository, ICustomerDataAccess customerDataAccess, IClientHelpers clientHelpers, ICreditHelpers creditHelpers)
 {
     ValidationUtils.ArgumentNotNull(companyRepository, nameof(companyRepository));
     ValidationUtils.ArgumentNotNull(customerDataAccess, nameof(customerDataAccess));
     ValidationUtils.ArgumentNotNull(clientHelpers, nameof(clientHelpers));
     ValidationUtils.ArgumentNotNull(creditHelpers, nameof(creditHelpers));
     _companyRepository  = companyRepository;
     _customerDataAccess = customerDataAccess;
     _clientHelpers      = clientHelpers;
     _creditHelpers      = creditHelpers;
 }