-
Notifications
You must be signed in to change notification settings - Fork 66
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
Implement equals for Actions to support better testing #225
Labels
Enhancement
Indicates a new feature request
Comments
Thx for the suggestion, we will try to work on that for the next releases. In the meantime, maybe you can use the serialised version of the objects and check equality of the result string? |
Thanks! Keen to have that release :) Nope, I can't. These |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
For 3DS integration, our code uses the respective SDK
Action
class implementations:RedirectAction
,Threeds2FingerprintAction
,Threeds2ChallengeAction
(ofc).In our tests, using Mockito / Mockito-Kotlin, we usually verify that certain methods are invoked with specific instances of classes to assert behaviour of our components. Such only work if the type of method arguments are implementing
equals
. Since we're using Kotlin and data classes, that's granted.But for aforementioned
Action
implementations, we can't do such verifications since these classes do not implementequals
, even though they are pretty much like data classes.Describe the solution you'd like
Let's implement equals in
Action
descendants.Additional context
Some sample (pseudo) code:
We have a ViewModel with a LiveData:
Test code mocks an observer to be used to verify LiveData emissions.
Then test code calls actions on ViewModel to make it emit expected objects and verify such emissions
The text was updated successfully, but these errors were encountered: