Exemplo n.º 1
0
 public void Setup()
 {
     _mockCountryService       = Substitute.For <ICountryService>();
     _mockEstimationRepository = Substitute.For <IEstimationRepository>();
     _mockExchangeService      = Substitute.For <IExchangeService>();
     _mockPaymentService       = Substitute.For <IPaymentService>();
     _mockTaxAndFeeService     = Substitute.For <ITaxAndFeeService>();
     _service = new EstimationService(_mockPaymentService, _mockTaxAndFeeService,
                                      _mockExchangeService, _mockCountryService, _mockEstimationRepository);
 }
Exemplo n.º 2
0
 public EstimationService(IPaymentService paymentService,
                          ITaxAndFeeService taxAndFeeService,
                          IExchangeService exchangeService,
                          ICountryService countryService,
                          IEstimationRepository estimationRepository)
 {
     _paymentService       = paymentService;
     _taxAndFeeService     = taxAndFeeService;
     _exchangeService      = exchangeService;
     _countryService       = countryService;
     _estimationRepository = estimationRepository;
 }
Exemplo n.º 3
0
        public void SetUp()
        {
            _userSession = Substitute.For <IUserSession>();

            _buildingRepository = Substitute.For <IBuildingRepository>();
            _userRepository     = Substitute.For <IUserRepository>();
            _companyRepository  = Substitute.For <ICompanyRepository>();

            _repositoryFactory    = Substitute.For <IRepositoryFactory>();
            _reportsRepository    = Substitute.For <IReportRepository>();
            _estimationRepository = Substitute.For <IEstimationRepository>();
            _repositoryFactory.Report(Arg.Any <string>()).Returns(_reportsRepository);
            _repositoryFactory.Estimation(Arg.Any <string>()).Returns(_estimationRepository);

            _reportAccessRules = Substitute.For <IReportAccessRules>();
            _reportsController =
                new ReportsController(_buildingRepository, _userSession, _userRepository, _companyRepository, _repositoryFactory, _reportAccessRules);
        }