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

Inject mocks via constructor to avoid lateinit var #1106

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

kkurczewski
Copy link
Contributor

One limitation is that constructor field order is important, mock dependencies must go before actual class. In order to remove this limitation we have to ask Junit team for helping hand.

Closes #758

One limitation is that constructor field order is important, mock dependencies must go before actual class. In order to remove this limitation we have to ask Junit team for helping hand.

Closes mockk#758
@Raibaz
Copy link
Collaborator

Raibaz commented Jun 28, 2023

Nice one, thanks for putting this together!

@Raibaz Raibaz merged commit 3d66a78 into mockk:master Jun 28, 2023
26 checks passed
@kkurczewski kkurczewski deleted the inject-mocks-via-ctor branch June 28, 2023 13:49
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.

@InjectMockKs can't be used with constructor injection
2 participants