Xero-NetStandard
Xero-NetStandard copied to clipboard
Question: Inject custom HttpClient to AccountingAPI
Hello!
I am writing some tests for my integration and want them to be as much end-to-end as possible. However, due to the Xero demo account is reset every 28 days, it can not be used for testing. So, I tried to mock the back-end by mocking the HttpClient.
I found I can inject HttpClient into XeroClient class, however, I don't see it available for AccountingApi class. Why is that? Could it be added? Or is there some workaround? Do I have to implement the ISynchronousClient and IAsynchronousClient?
I am using the latest versions: Xero.NetStandard.OAuth2 v3.17.0 Xero.NetStandard.OAuth2Client v1.3.3
Also interested in this.