FuelSDK-Java
FuelSDK-Java copied to clipboard
Adds simple interfaces for ETClient and ETRestConnection.
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.
@smunuswami
@daniel-deutsch-zocdoc I am not able to understand what your changes accomplish. Can you please provide me more details?
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 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).