public async Task Order_Should_Be_Completed() { // Arrange await Order_Should_Be_Created(); Guid orderId = Guid.Empty; UsingDbContext(db => { var order = db.Orders.First(); order.OrderStatus.ShouldNotBe(OrderStatus.Completed); order.CompletionTime.ShouldBeNull(); orderId = order.Id; order.SetPaidTime(DateTime.Now); order.SetReducedInventoryAfterPaymentTime(DateTime.Now); db.SaveChanges(); }); // Act var response = await _orderAppService.CompleteAsync(orderId); // Assert response.ShouldNotBeNull(); response.Id.ShouldBe(orderId); response.OrderStatus.ShouldBe(OrderStatus.Completed); }
public Task <OrderDto> CompleteAsync(CompleteOrderInput input) { return(_service.CompleteAsync(input)); }
public Task <OrderDto> CompleteAsync(Guid id) { return(_service.CompleteAsync(id)); }