Skip to content
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

Provide AdditionalMatchers for Kotlin #507

Closed
paulferaud opened this issue Jan 16, 2024 · 1 comment
Closed

Provide AdditionalMatchers for Kotlin #507

paulferaud opened this issue Jan 16, 2024 · 1 comment

Comments

@paulferaud
Copy link
Contributor

I need this because most AdditionalMatcher actually return null, creating NPE issues.

I can work on implementing and testing this. I'm not sure if these functions should be in global scope, alongside everything else, or scoped to an AdditionalMatchers object though?

@paulferaud
Copy link
Contributor Author

To clarify, I had:

verify(myCLass).processString(not(contains("{{")))

After porting my class to Kotlin, and marking the string in processString as non-nullable, I got:

not(...) must not be null

Which... actually took a fair amount of time to figure out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant