public async Task GetDetailAsync_ReturnsCreditNote() { // Act var creditNoteGetModel = (await CreditNoteClient.Detail(_postedCreditNoteId).GetAsync()).AssertResult(); // Assert Assert.AreEqual(_postedCreditNoteId, creditNoteGetModel.Id); ComparePostAndGetModels(_creditNotePostModel, creditNoteGetModel, false); ComparePostAndGetItems(_creditNotePostModel.Items, creditNoteGetModel.Items.Cast <CreditNoteItemListGetModel>().ToList()); }
public void GetDetail_ReturnsCreditNote() { // Act var creditNoteGetModel = CreditNoteClient.Detail(_postedCreditNoteId) .Include(c => c.CreditedInvoice).Get().AssertResult(); // Assert Assert.AreEqual(_postedCreditNoteId, creditNoteGetModel.Id); ComparePostAndGetModels(_creditNotePostModel, creditNoteGetModel, false); ComparePostAndGetItems(_creditNotePostModel.Items, creditNoteGetModel.Items.Cast <CreditNoteItemListGetModel>().ToList()); AssertDeliveryAddress(creditNoteGetModel.DeliveryAddress, DeliveryAddressId1); Assert.NotNull(creditNoteGetModel.CreditedInvoice); Assert.AreEqual(creditNoteGetModel.CreditedInvoiceId, creditNoteGetModel.CreditedInvoice.Id); }