You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: