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

Added mockkStatic support for val Any.xxx get() #582

Merged
merged 1 commit into from Mar 12, 2021
Merged

Added mockkStatic support for val Any.xxx get() #582

merged 1 commit into from Mar 12, 2021

Conversation

gmazzo
Copy link
Contributor

@gmazzo gmazzo commented Mar 11, 2021

We have found another use case for mockkStatic. Basically it's syntax sugar for when you try to mock an extension property like this:

val Int.square get()= this * this

@Raibaz
Copy link
Collaborator

Raibaz commented Mar 11, 2021

Nice, thanks a lot for sending this through!

Just a favor to ask: can you please add a mention to this in the documentation?

It's just a matter of adding it in README.md, around line 800 in the section about mocking extension functions should be ok.

@gmazzo
Copy link
Contributor Author

gmazzo commented Mar 12, 2021

Updated!

@Raibaz
Copy link
Collaborator

Raibaz commented Mar 12, 2021

Thanks a lot!

@Raibaz Raibaz merged commit f57e70b into mockk:master Mar 12, 2021
This was referenced Mar 17, 2021
This was referenced Mar 17, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants