public async Task Should_Update_PurchaseOrder() { // Arrange var guid = Resolve <PurchaseOrderServiceMockManager>().PurchaseOrderGuid; // Act var purchaseOrder = await _appService.UpdatePurchaseOrderAsync(guid, new PurchaseOrderDto { Discount = 5 }); // Assert Assert.False(LocalNotification.HasNotification()); Assert.Equal(purchaseOrder.Id, guid); Assert.Equal(5, purchaseOrder.Discount); }
public async Task <IActionResult> Put(Guid id, [FromBody] PurchaseOrderDto purchaseOrder) { var response = await _appService.UpdatePurchaseOrderAsync(id, purchaseOrder); return(CreateResponseOnPut(response, name)); }