public virtual async void TestDelete() { var builder = new WebHostBuilder() .UseEnvironment("Production") .UseStartup <TestStartup>(); TestServer testServer = new TestServer(builder); var client = new ApiClient(testServer.CreateClient()); client.SetBearerToken(JWTTestHelper.GenerateBearerToken()); ApplicationDbContext context = testServer.Host.Services.GetService(typeof(ApplicationDbContext)) as ApplicationDbContext; IPaymentTypeService service = testServer.Host.Services.GetService(typeof(IPaymentTypeService)) as IPaymentTypeService; var model = new ApiPaymentTypeServerRequestModel(); model.SetProperties("B"); CreateResponse <ApiPaymentTypeServerResponseModel> createdResponse = await service.Create(model); createdResponse.Success.Should().BeTrue(); ActionResponse deleteResult = await client.PaymentTypeDeleteAsync(2); deleteResult.Success.Should().BeTrue(); ApiPaymentTypeServerResponseModel verifyResponse = await service.Get(2); verifyResponse.Should().BeNull(); }
public virtual async void TestUpdate() { var builder = new WebHostBuilder() .UseEnvironment("Production") .UseStartup <TestStartup>(); TestServer testServer = new TestServer(builder); var client = new ApiClient(testServer.CreateClient()); client.SetBearerToken(JWTTestHelper.GenerateBearerToken()); var mapper = new ApiPaymentTypeServerModelMapper(); ApplicationDbContext context = testServer.Host.Services.GetService(typeof(ApplicationDbContext)) as ApplicationDbContext; IPaymentTypeService service = testServer.Host.Services.GetService(typeof(IPaymentTypeService)) as IPaymentTypeService; ApiPaymentTypeServerResponseModel model = await service.Get(1); ApiPaymentTypeClientRequestModel request = mapper.MapServerResponseToClientRequest(model); request.SetProperties("B"); UpdateResponse <ApiPaymentTypeClientResponseModel> updateResponse = await client.PaymentTypeUpdateAsync(model.Id, request); context.Entry(context.Set <PaymentType>().ToList()[0]).Reload(); updateResponse.Record.Should().NotBeNull(); updateResponse.Success.Should().BeTrue(); updateResponse.Record.Id.Should().Be(1); context.Set <PaymentType>().ToList()[0].Name.Should().Be("B"); updateResponse.Record.Id.Should().Be(1); updateResponse.Record.Name.Should().Be("B"); }
public OrderController(IOrderService orderService, IOrderDetailService orderDetailService, IPaymentTypeService paymentTypeService, IMapper mapper) { _orderService = orderService; _orderDetailService = orderDetailService; _paymentTypeService = paymentTypeService; _mapper = mapper; }
public CreditTransactionService(IRepository <CreditTransaction> creditTransactionRepository, IRepository <CreditWallet> creditWalletRepository, IPaymentTypeService paymentTypesService) { _creditTransactionRepository = creditTransactionRepository; _creditWalletRepository = creditWalletRepository; _paymentTypesService = paymentTypesService; }
public ExpenseController(UserManager <IdentityUser> userManager, IExpenseReportService expenseReportService, ICategoryService categoryService, IPaymentTypeService paymentTypeService) { this.userManager = userManager; _expenseReportService = expenseReportService; _categoryService = categoryService; _paymentTypeService = paymentTypeService; }
public TypesController(IPaymentTypeService service) { if (service == null) { throw new ArgumentNullException("TypesController:service"); } _service = service; }
public CartsController(ICartService _cartService, ICartProductService _cartProductService, ISalesInformationService _salesInformationService, IPaymentTypeService _paymentTypeService, IUserService _userService) { cartService = _cartService; cartProductService = _cartProductService; salesInformationService = _salesInformationService; paymentTypeService = _paymentTypeService; userService = _userService; }
public OrderViewModelFactory( IPaymentTypeService paymentService, IOrderService orderService, IMapper mapper) { _paymentService = paymentService; _orderService = orderService; _mapper = mapper; }
public OrderController(ICartService cartService, IOrderService orderService, IPaymentTypeService paymentTypeService, IOrderDetailService orderDetailService, IProductService productService, UserManager <User> userManager, IMapper mapper) { _cartService = cartService; _orderService = orderService; _paymentTypeService = paymentTypeService; _orderDetailService = orderDetailService; _userManager = userManager; _productService = productService; _mapper = mapper; }
public PaymentTests() { IUnitOfWork uow = new NHUnitOfWork(); this._paymentTypeRepository = new PaymentTypeRepository(uow); this._paymentTypeService = new PaymentTypeService(this._paymentTypeRepository, uow); this._paymentRepository = new PaymentRepository(uow); this._paymentService = new PaymentService(this._paymentRepository, uow); }
public PurchaseOrderController( IPurchaseOrderService purchaseOrderService, IPurchaseTypeService purchaseTypeService, IPaymentTypeService paymentTypeService, ISupplierService supplierService ) { this._purchaseOrderService = purchaseOrderService; this._purchaseTypeService = purchaseTypeService; this._paymentTypeService = paymentTypeService; this._supplierService = supplierService; }
public AbstractPaymentTypeController( ApiSettings settings, ILogger <AbstractPaymentTypeController> logger, ITransactionCoordinator transactionCoordinator, IPaymentTypeService paymentTypeService, IApiPaymentTypeModelMapper paymentTypeModelMapper ) : base(settings, logger, transactionCoordinator) { this.PaymentTypeService = paymentTypeService; this.PaymentTypeModelMapper = paymentTypeModelMapper; }
public ViewVatDocumentService( ICompanyDeletableEntityRepository <VatDocument> vatDocumentRepo, ICompanySettingsService companySettingsService, IPartnerService partnerService, IPaymentTypeService paymentTypeService, IBankAccountService bankAccountService) { this.vatDocumentRepo = vatDocumentRepo; this.companySettingsService = companySettingsService; this.partnerService = partnerService; this.paymentTypeService = paymentTypeService; this.bankAccountService = bankAccountService; }
public PaymentTypeController( ApiSettings settings, ILogger <PaymentTypeController> logger, ITransactionCoordinator transactionCoordinator, IPaymentTypeService paymentTypeService, IApiPaymentTypeServerModelMapper paymentTypeModelMapper ) : base(settings, logger, transactionCoordinator) { this.PaymentTypeService = paymentTypeService; this.PaymentTypeModelMapper = paymentTypeModelMapper; this.BulkInsertLimit = 250; this.MaxLimit = 1000; this.DefaultLimit = 250; }
public RepairManagementController() { _serviceRepairService = new ServiceRepairService(); _carService = new CarService(); _serviceBookingService = new ServiceBookingService(); _customerService = new CustomerService(); _userService = new UserService(); _repairTypeService = new RepairTypeService(); _serviceAccountTypeService = new ServiceAccountTypeService(); _partsService = new PartsService(); _repairItemService = new RepairItemService(); _serviceTicketTypeService = new ServiceTicketTypeService(); _paymentTypeService = new PaymentTypeService(); _washItemService = new WashItemService(); _serviceRepairHistoryService = new ServiceRepairHistoryService(); }
public VatDocumentController(ICompanyDeletableEntityRepository <Company> companyRepository, IVatTypeService vatTypeService, IEmployeeService employeeService, IPaymentTypeService paymentTypeService, IBankAccountService bankAccountService, IVatDocumentService vatDocumentService, IUserCompanyTemp userCompanyTemp) { this.companyRepository = companyRepository; this.vatTypeService = vatTypeService; this.employeeService = employeeService; this.paymentTypeService = paymentTypeService; this.bankAccountService = bankAccountService; this.vatDocumentService = vatDocumentService; this.userCompanyTemp = userCompanyTemp; }
public PaymentTypeRepository(IMapper mapper, IPaymentTypeService paymentType) { _mapper = mapper; _paymentType = paymentType; }
public PaymentTypeController(IPaymentTypeService paymentType, IEventLogService eventLogService) { _paymentType = paymentType; _eventLogService = eventLogService; }
public PaymentTypeBusinessService(IPaymentTypeService paymentTypeService, IMapper mapper) { this.paymentTypeService = paymentTypeService; this.mapper = mapper; }
public PaymentTypeController() { _paymentTypeService = new PaymentTypeService(); }
public PaymentTypesController(IPaymentTypeService _paymentTypeService) { paymentTypeService = _paymentTypeService; }
public PaymentTypeController(IPaymentTypeService paymentTypeService) { _paymentsTypeService = paymentTypeService; }
public PaymentTypeController(IMapper mapper, IPaymentTypeService paymentTypeService) { this.mapper = mapper; this.paymentTypeService = paymentTypeService; }
public PaymentTypeController(IPaymentTypeService paymentTypeService) { this.paymentTypeService = paymentTypeService; }
public PaymentTypeController(IPaymentTypeService service) : base(service) { }