mockito-kotlin icon indicating copy to clipboard operation
mockito-kotlin copied to clipboard

Return an empty String instead of null when creating a mock

Open jordigarcl opened this issue 5 years ago • 3 comments
trafficstars

See #372 for reference

I believe String values in mocks should return "" by default.

It is a historically 'special' type which has always had some special 'primitive-like' privileges. I assume people expect it to return a nice value as well!

Thank you for submitting a pull request! But first:

jordigarcl avatar Jan 15 '20 21:01 jordigarcl

Has this PR been reviewed yet?

jordigarcl avatar Feb 09 '20 18:02 jordigarcl

What does plain Mockito do?

wesalvaro avatar Mar 02 '23 05:03 wesalvaro

Plain Mockito returns null.

wesalvaro avatar Apr 28 '23 06:04 wesalvaro