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

Custom any value generator #643

Merged
merged 4 commits into from Jun 25, 2021
Merged

Conversation

hrach
Copy link
Contributor

@hrach hrach commented Jun 16, 2021

Closes #642

@hrach hrach force-pushed the custom_any_value_generator branch 11 times, most recently from 991ca65 to 889d465 Compare June 23, 2021 07:56
@hrach hrach force-pushed the custom_any_value_generator branch 3 times, most recently from a517bb7 to d9c09d4 Compare June 23, 2021 09:03
@hrach hrach force-pushed the custom_any_value_generator branch from d9c09d4 to 4b4c63a Compare June 24, 2021 08:11
@hrach hrach force-pushed the custom_any_value_generator branch 2 times, most recently from db7d1bd to caea7cc Compare June 24, 2021 09:41
@hrach
Copy link
Contributor Author

hrach commented Jun 24, 2021

Hi @Raibaz this is probably ready to go.

  • first commits properly reads the nullability
  • the second introduces mutability for any value generator and opens the api a bit
  • the third commit is a fix from my previous PR changing this, sadly it passed the tests but running in my unit-tests (not-android test) it was somehow missing - adding copies to proper places
  • the fourth commit is fixing reflection exception, I was unable to find repro case as this was pretty much complicated code (generics, interface with inheritance, reactive chains)

I'd tried to fix the android runner as discussed here: ReactiveCircus/android-emulator-runner#160 but doesn't seem to work.

@hrach hrach force-pushed the custom_any_value_generator branch from b71ba9e to caea7cc Compare June 24, 2021 19:39
@Raibaz
Copy link
Collaborator

Raibaz commented Jun 25, 2021

Whatever, merging this and in case the android builds still fail I'll address them on master.

Thanks a lot for all the work you put into this!

@Raibaz Raibaz merged commit 430d358 into mockk:master Jun 25, 2021
@hrach
Copy link
Contributor Author

hrach commented Jun 25, 2021

Thank you a lot! I have to say your maintainer's response time/attitude exceeded my expectations a lot!

@hrach hrach deleted the custom_any_value_generator branch June 25, 2021 08:39
@cbxp
Copy link

cbxp commented Dec 3, 2021

Cannot find any documentation on how to substitute own null-returning AnyValueGenerator...

@mafo5
Copy link

mafo5 commented May 3, 2023

Cannot find any documentation on how to substitute own null-returning AnyValueGenerator...

The headline is misleading! The PR extends the relaxed=true behavior to the AnyValueGenerator as well.

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.

Utilizing nullability in relaxed mock
4 participants