We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
null
This example describes the issue:
@Test public void mocksWithDeepStubsReturnNameOnToString() { Object proudMock = Mockito.mock( Object.class, Mockito.withSettings() .name("I'm a mock!") .defaultAnswer(Mockito.RETURNS_DEEP_STUBS)); // fails, toString() returns null assertThat(proudMock.toString()).isEqualTo("I'm a mock!"); }
I'm experiencing this on 2.26.0, (looking at ReturnsDeepStubs looks like it hasn't changed much since then).
I think toString should still return the mock's name, right now it returns a null.
The text was updated successfully, but these errors were encountered:
Fixes mockito#1898 : Return mock name from toString method for deep s…
a41b3c5
…tub mocks
2e98392
Fixes #1898 : Return mock name from toString method for deep stub moc…
3c10616
…ks (#1942)
ddfe44e
…tub mocks (mockito#1942)
Successfully merging a pull request may close this issue.
This example describes the issue:
I'm experiencing this on 2.26.0, (looking at ReturnsDeepStubs looks like it hasn't changed much since then).
I think toString should still return the mock's name, right now it returns a
null
.The text was updated successfully, but these errors were encountered: