Xero-NetStandard icon indicating copy to clipboard operation
Xero-NetStandard copied to clipboard

Question: Inject custom HttpClient to AccountingAPI

Open richardrandak opened this issue 4 years ago • 1 comments

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

richardrandak avatar Jun 23 '21 16:06 richardrandak

Also interested in this.

RossMMason avatar Jan 21 '22 15:01 RossMMason