-
Notifications
You must be signed in to change notification settings - Fork 93
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
Stubbing method same params value twice on same mock take the first one not last one #21
Comments
Thanks for reporting it. It will be default behavior in 2.0 version that will be available in a few days. |
That is great, will give it another try then...
On Wed, Apr 26, 2017, 14:48 Maciej Kuster ***@***.***> wrote:
Thanks for reporting it. It will be default behavior in 2.0 version that
will be available in a few days.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#21 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABvpSPVeLvPnWV00dm4P-JRSvHBrc_Dyks5rz4NxgaJpZM4NJM3O>
.
--
Saludos.
Nestor
|
Should be fixed in 2.0 version. Please reopen if something is still wrong. |
@Wolfium
instead of:
|
johanblumenberg
pushed a commit
to johanblumenberg/ts-mockito
that referenced
this issue
Aug 12, 2022
feat(*): run actions per push
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Indented behavior is last stubbing is more important and should be used.
when(mock(mockObject.method())).thenReturn(false);
when(mock(mockObject.method())).thenReturn(true);
Return false.
it should return last stubbing value, true.
when(mock(mockObject.method())).thenReturn(false);
reset(mockObject);
when(mock(mockObject.method())).thenReturn(true);
Workaround calling reset before next stubbing duplicate, but would be great be default simpler usage and does not reset the whole object.
Regards
The text was updated successfully, but these errors were encountered: