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 validation for classes with private methods #702

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jmf-tls
Copy link

@jmf-tls jmf-tls commented Mar 8, 2021

No description provided.

@jmf-tls
Copy link
Author

jmf-tls commented Mar 8, 2021

With the new private method the tests in FakingEverythingTest fail with the following errors:

[INFO] Running mockit.FakingEverythingTest
[ERROR] Tests run: 4, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 0.105 s <<< FAILURE! - in mockit.FakingEverythingTest
[ERROR] publicAdviceMethodInPublicFakeClass(mockit.FakingEverythingTest)  Time elapsed: 0.078 s  <<< ERROR!
java.lang.IllegalArgumentException: Unsupported fake for private method TargetClass#doSomethingInternal()V found
	at mockit.FakingEverythingTest.publicAdviceMethodInPublicFakeClass(FakingEverythingTest.java:153)

[ERROR] fakeEveryMethodInSingleClassWithAdviceOnly(mockit.FakingEverythingTest)  Time elapsed: 0.005 s  <<< ERROR!
java.lang.IllegalArgumentException: Unsupported fake for private method TargetClass#doSomethingInternal()V found
	at mockit.FakingEverythingTest.fakeEveryMethodInSingleClassWithAdviceOnly(FakingEverythingTest.java:74)

[ERROR] fakeEveryMethodInSingleClass(mockit.FakingEverythingTest)  Time elapsed: 0.005 s  <<< ERROR!
java.lang.IllegalArgumentException: Unsupported fake for private method TargetClass#doSomethingInternal()V found
	at mockit.FakingEverythingTest.fakeEveryMethodInSingleClass(FakingEverythingTest.java:26)

[ERROR] fakeEveryMethodInClassHierarchy(mockit.FakingEverythingTest)  Time elapsed: 0.009 s  <<< ERROR!
java.lang.IllegalArgumentException: Unsupported fake for private method TargetClass#doSomethingInternal()V found
	at mockit.FakingEverythingTest.fakeEveryMethodInClassHierarchy(FakingEverythingTest.java:87)

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

Successfully merging this pull request may close these issues.

None yet

1 participant