Ejemplo n.º 1
0
 public AddInvoice() : base()
 {
     _invoiceServiceMock = new();
     _orderRepository    = new();
     _serviceProvider.Setup(s => s.GetService(typeof(IInvoiceService))).Returns(_invoiceServiceMock.Object);
     _serviceProvider.Setup(s => s.GetService(typeof(IRepository <Order, Guid>))).Returns(_orderRepository.Object);
     _invoiceViewService = new(_serviceProvider.Object);
 }
Ejemplo n.º 2
0
        public GetInvoiceList() : base()
        {
            _invoiceService  = new();
            _orderRepository = new();
            //IMapper mapper = new MapperConfiguration(cfg => {
            //    cfg.CreateMap<Invoice, GetInvoiceListOutputDto>();
            //}).CreateMapper();
            _serviceProvider.Setup(s => s.GetService(typeof(IInvoiceService))).Returns(_invoiceService.Object);
            _serviceProvider.Setup(s => s.GetService(typeof(IRepository <Order, Guid>))).Returns(_orderRepository.Object);
            //_serviceProvider.Setup(s => s.GetService(typeof(IMapper))).Returns(mapper);

            _invoiceViewService = new(_serviceProvider.Object);
        }