FuelSDK-Java icon indicating copy to clipboard operation
FuelSDK-Java copied to clipboard

Adds simple interfaces for ETClient and ETRestConnection.

Open daniel-deutsch-zocdoc opened this issue 6 years ago • 4 comments

Only method exposed on ETClient at the moment is getRestConnection, making it clear that this is the only use of the client for non-SOAP endpoints.

daniel-deutsch-zocdoc avatar Nov 17 '17 17:11 daniel-deutsch-zocdoc

@smunuswami

daniel-deutsch-zocdoc avatar Nov 17 '17 17:11 daniel-deutsch-zocdoc

@daniel-deutsch-zocdoc I am not able to understand what your changes accomplish. Can you please provide me more details?

smunuswami avatar Nov 17 '17 17:11 smunuswami

Also we are in middle of implementing CI build for our Java SDK. Until then we have to hold on to any PRs. Sorry for any inconvenience it may have caused.

smunuswami avatar Nov 17 '17 17:11 smunuswami

@smunuswami right now, there is a lot of logic encapsulated within the construction of an ETClient object. It is also a base class with no interface. This makes testing and mocking the object difficult, as constructing the object necessitates legitimate credentials to SFMC as the instantiation attempts to actually connect and grab a token.

This PR adds a barebones interface that the ETClient implements, that users of this library can then mock out for easier unit testing (e.g., creating their own dummy IETClient implementation that does not actually connect to SFMC).

daniel-deutsch-zocdoc avatar Nov 17 '17 17:11 daniel-deutsch-zocdoc