Example #1
0
        public void Update_SuccessfullyUpdated()
        {
            var dateOfIssue = new DateTime(2020, 10, 12).SetKindUtc();
            var model       = new IssuedTaxDocumentPatchModel
            {
                Id          = _issuedTaxDocumentId,
                DateOfIssue = dateOfIssue,
                Items       = new List <IssuedTaxDocumentItemPatchModel>()
                {
                    new IssuedTaxDocumentItemPatchModel
                    {
                        Id   = _issuedTaxDocumentItemId,
                        Name = "TestModel",
                    }
                }
            };

            // Act
            var result = _issuedTaxDocumentClient.Update(model).AssertResult();

            // Assert
            Assert.That(result.DateOfIssue, Is.EqualTo(dateOfIssue));
            Assert.That(result.Items.Count, Is.GreaterThanOrEqualTo(0));
            Assert.That(result.Items[0].Name, Is.EqualTo("TestModel"));
        }
 /// <inheritdoc/>
 public Task <ApiResult <IssuedTaxDocumentGetModel> > UpdateAsync(IssuedTaxDocumentPatchModel model, CancellationToken cancellationToken = default)
 {
     return(PatchAsync <IssuedTaxDocumentPatchModel, IssuedTaxDocumentGetModel>(model, cancellationToken));
 }
Example #3
0
 /// <inheritdoc/>
 public ApiResult <IssuedTaxDocumentGetModel> Update(IssuedTaxDocumentPatchModel model)
 {
     return(Patch <IssuedTaxDocumentPatchModel, IssuedTaxDocumentGetModel>(model));
 }