Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encapsulate AquariusClient instance variables #55

Open
cschroedl-gov opened this issue Jul 2, 2018 · 0 comments
Open

Encapsulate AquariusClient instance variables #55

cschroedl-gov opened this issue Jul 2, 2018 · 0 comments

Comments

@cschroedl-gov
Copy link

cschroedl-gov commented Jul 2, 2018

User story format time!

As a developer who wants to test code that relies on this library, I want to be able to mock the AquariusClient so that my unit tests are fast and don't affect a real AQTS server.

Common Java mock libraries focus on methods. Currently, the client can't be effectively mocked because the Provisioning, Acquisition, and Publish instance variables are all unencapsulated -- they are accessed directly instead of through methods. You can make it possible to mock this class with common tools by adding accessor methods for these instance variables.

Alternatively, you could modify the class so that it was possible to subclass it. This would permit users to override the parent class' method implementations with no-op implementations.

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

No branches or pull requests

1 participant