Exemplo n.º 1
0
        public async Task UpdateAsync_SuccessfullyUpdated()
        {
            var model = new ProformaInvoicePatchModel
            {
                Id          = _proformaInvoiceIdAsync,
                Description = "DescriptionUpdated"
            };

            // Act
            var data = (await _proformaInvoiceClient.UpdateAsync(model)).AssertResult();

            // Assert
            Assert.AreEqual(model.Description, data.Description);
        }
Exemplo n.º 2
0
        public void Update_SuccessfullyUpdated()
        {
            var model = new ProformaInvoicePatchModel
            {
                Id = _proformaInvoiceId,
                DeliveryAddressId = DeliveryAddressId2,
                Description       = "DescriptionUpdated",
                MyAddress         = new MyDocumentAddressPatchModel
                {
                    AccountNumber = "555777",
                    Iban          = "5453187522"
                }
            };

            // Act
            var data = _proformaInvoiceClient.Update(model).AssertResult();

            // Assert
            Assert.AreEqual(model.Description, data.Description);
            Assert.AreEqual(model.MyAddress.AccountNumber, data.MyAddress.AccountNumber);
            Assert.AreEqual(model.MyAddress.Iban, data.MyAddress.Iban);
            AssertDeliveryAddress(data.DeliveryAddress, DeliveryAddressId2);
        }
Exemplo n.º 3
0
 /// <inheritdoc />
 public ApiResult <ProformaInvoiceGetModel> Update(ProformaInvoicePatchModel model)
 {
     return(Patch <ProformaInvoicePatchModel, ProformaInvoiceGetModel>(model));
 }
 /// <inheritdoc/>
 public Task <ApiResult <ProformaInvoiceGetModel> > UpdateAsync(ProformaInvoicePatchModel model, CancellationToken cancellationToken = default)
 {
     return(PatchAsync <ProformaInvoicePatchModel, ProformaInvoiceGetModel>(model, cancellationToken));
 }