public async Task UpdateAsync_SuccessfullyUpdated() { var model = new ReceivedInvoicePatchModel { Id = _receivedInvoiceIdAsync, Description = "DescriptionUpdated" }; // Act var data = (await _receivedInvoiceClient.UpdateAsync(model)).AssertResult(); // Assert Assert.AreEqual(model.Description, data.Description); }
public void Update_SuccessfullyUpdated() { var model = new ReceivedInvoicePatchModel { Id = _receivedInvoiceId, Description = "DescriptionUpdated" }; // Act var data = _receivedInvoiceClient.Update(model).AssertResult(); // Assert Assert.AreEqual(model.Description, data.Description); }
public void Update_NotValidModel_ReceivedDocumentNumberTooLong_ThrowException() { var model = new ReceivedInvoicePatchModel { Id = _receivedInvoiceId, ReceivedDocumentNumber = new string('A', 31) }; // Act var exception = Assert.Throws <ValidationException>(() => _receivedInvoiceClient.Update(model)); // Assert Assert.IsNotNull(exception.Message); Assert.IsNotEmpty(exception.Message); }
/// <inheritdoc /> public Task <ApiResult <ReceivedInvoiceGetModel> > UpdateAsync(ReceivedInvoicePatchModel model, CancellationToken cancellationToken = default) { return(PatchAsync <ReceivedInvoicePatchModel, ReceivedInvoiceGetModel>(model, cancellationToken)); }
/// <inheritdoc /> public ApiResult <ReceivedInvoiceGetModel> Update(ReceivedInvoicePatchModel model) { return(Patch <ReceivedInvoicePatchModel, ReceivedInvoiceGetModel>(model)); }