public PurchaseOrderServiceTest() { _calculatorRuleService = new CalculatorRuleService(new NullLoggerFactory()); _resellerRepository = new Mock <IResellerRepository>(); _repository = new Mock <IPurchaseOrderRepository>(); _service = new PurchaseOrderService(_resellerRepository.Object, _repository.Object, _calculatorRuleService, new NullLoggerFactory()); _validReseller = new Reseller() { Id = Guid.NewGuid(), CPF = "153.509.460-56", AutoApproved = true, Name = "Usuário [153.509.460-56]", Email = "*****@*****.**", Password = "******" }; _validNewNewPurchaseOrderModel = new NewPurchaseOrderModel() { CPF = _validReseller.CPF, Date = DateTime.Now.Date, Value = 600 }; TinyMapperConfiguration.AddTinyMapperConfiguration(null); }
public ResellerServiceTest() { IHttpClientFactory httpClientFactoryMock = HttpFakeConfig(); var myConfiguration = new Dictionary <string, string> { { "BalanceAPI:RelativeURL", "v1/cashback?cpf=11144477735" } }; _configuration = new ConfigurationBuilder() .AddInMemoryCollection(myConfiguration) .Build(); _repository = new Mock <IResellerRepository>(); _service = new ResellerService(_repository.Object, httpClientFactoryMock, _configuration, new NullLoggerFactory()); _validReseller = new Reseller() { Id = Guid.NewGuid(), CPF = "153.509.460-56", AutoApproved = true, Name = "Usuário [153.509.460-56]", Email = "*****@*****.**", Password = "******" }; TinyMapperConfiguration.AddTinyMapperConfiguration(null); }