Ejemplo n.º 1
0
        public async Task AddAsync_Calls_OrdersService()
        {
            //Arrange
            var orderViewModel = new OrderViewModel
            {
                ShopName        = "Test Name",
                CustomerName    = "Test Name",
                DeliveryAddress = "Test Address",
                AWB             = "Test AWB"
            };

            //Act
            var result = await _ordersController.AddAsync(orderViewModel);

            //Assert
            _mockOrdersService.Verify(x => x.SaveAsync(orderViewModel), Times.Once);
        }