示例#1
0
        public void Delete_SuccessfullyDeletedCreditNote()
        {
            // Act
            var result1 = CreditNoteClient.Delete(_postedCreditNoteId).AssertResult();
            var result2 = CreditNoteClient.Delete(_offsetCreditNoteId).AssertResult();

            // Assert
            Assert.True(result1);
            Assert.True(result2);
        }
示例#2
0
        public async Task CreateFromInvoiceWithMossAsync_SuccessfullyCreated()
        {
            // Act
            var model = (await CreditNoteClient.DefaultAsync(InvoiceWithMossId)).AssertResult();

            model.CreditNoteReason = "Creadit note reason";
            var result = (await CreditNoteClient.PostAsync(model)).AssertResult();

            // Assert
            Assert.Greater(result.Id, 0);
            Assert.That(result.HasVatRegimeOss, Is.True);
            Assert.AreEqual(result.Items.First().VatRate, 19);

            // Teardown
            CreditNoteClient.Delete(result.Id);
        }