-
Notifications
You must be signed in to change notification settings - Fork 163
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
mockito:mockBuilder generator fail using MockSpec custom superclass #729
Comments
Uh, I feel like the right thing to do here is just to make |
I need to extend EG: class GetxMockSpec<T> extends MockSpec<T> {
const GetxMockSpec() : super(
fallbackGenerators: const {
#onStart: fallbackGenerator,
}
);
} |
Could be a wrapper function instead. MockSpec<T> getxMockSpec<T>() => MockSpec<T>(fallbackGenerators: {#onStart: generator}); (and I really hope we'll be able to get rid of fallback generators in the next major version). |
Can the wrapper function be used in an annotation? |
Wrapper function can't be used inside annotation: |
Mockito generator fail using a custom superclass that extends MockSpec inside GenerateNiceMocks annotation.
Command:
dart run build_runner build
Error:
The problem is related to
_mockTargetFromMockSpec
method inside lib/src/builder.dart file, because of superclass contains values inside(super)
field.E.g.:
The text was updated successfully, but these errors were encountered: