-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
#1900 Configure mocks for annotation interfaces with default values from annotation #1901
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
base: main
Are you sure you want to change the base?
Conversation
…alues from annotation
|
||
if(typeToMock.isAnnotation()) { | ||
configureMockWithAnnotationDefaults(typeToMock, mock); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works well but I'm not sure if this is the best position to hook in this functionality - I'm happy to adjust if there is a better position to perform this.
Codecov Report
@@ Coverage Diff @@
## release/3.x #1901 +/- ##
=================================================
- Coverage 86.67% 86.66% -0.02%
- Complexity 2526 2530 +4
=================================================
Files 318 318
Lines 6650 6660 +10
Branches 832 834 +2
=================================================
+ Hits 5764 5772 +8
- Misses 685 687 +2
Partials 201 201
Continue to review full report at Codecov.
|
@@ -62,6 +63,11 @@ public boolean isTypeMockable(Class<?> typeToMock) { | |||
MockCreationSettings<T> creationSettings = impl.build(typeToMock); | |||
T mock = createMock(creationSettings); | |||
mockingProgress().mockingStarted(mock, creationSettings); | |||
|
|||
if(typeToMock.isAnnotation()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if(typeToMock.isAnnotation()) { | |
if (typeToMock.isAnnotation()) { |
Closes #1900