public void TestGetAllInvoicesForInvoiceItem() { string filepath = "dummy_invoice_item.json"; string url = string.Format("{0}/{1}", invoiceItemURL, INVOICEITEMID); Client client = new Client(ACCESSID, SECRETKEY, Helper.GetMockRequestFactory(filepath, url)); InvoiceItem invoiceitem = client.InvoiceItem.Retrieve(INVOICEITEMID); string expectedJsonString = Helper.GetJsonString(filepath); Helper.AssertEntity(invoiceitem, expectedJsonString); string filepath2 = "dummy_invoice_collection.json"; string invoices_url = string.Format("{0}/invoices", url); client = new Client(ACCESSID, SECRETKEY, Helper.GetMockRequestFactory(filepath2, invoices_url)); var result = invoiceitem.Invoices(); expectedJsonString = Helper.GetJsonString(filepath2); Helper.AssertEntity(result, expectedJsonString); }