Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Adds simple interfaces for ETClient and ETRestConnection. #73

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

daniel-deutsch-zocdoc
Copy link

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.

@@ -249,6 +249,14 @@
</dependency>
</dependencies>
</plugin>
<plugin>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this is not wanted / constitutes a breaking change, it can be removed along with the @OverRide annotations.

@daniel-deutsch-zocdoc daniel-deutsch-zocdoc changed the base branch from master to development November 17, 2017 17:13
@daniel-deutsch-zocdoc daniel-deutsch-zocdoc force-pushed the feature/add-interface-for-easier-test-mocking-etclient-rest branch from 35d6e90 to 7c3f081 Compare November 17, 2017 17:13
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 daniel-deutsch-zocdoc force-pushed the feature/add-interface-for-easier-test-mocking-etclient-rest branch from 7c3f081 to a5082ae Compare November 17, 2017 17:15
@daniel-deutsch-zocdoc
Copy link
Author

@smunuswami

@smunuswami
Copy link
Contributor

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

@smunuswami
Copy link
Contributor

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.

@daniel-deutsch-zocdoc
Copy link
Author

@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).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants