I do have the next Use Case
class GetLessonsUseCase extends UseCase<List<LessonEntity>, void> { final LessonsRepository _repository; GetLessonsUseCase(this._repository); @override Future<List<LessonEntity>> call({void params}) async { return _repository.getLessons(); }}
and the problem is that mockito generates the next code with error
// A class which mocks [GetLessonsUseCase].////// See the documentation for Mockito's code generation for more information.class MockGetLessonsUseCase extends _i1.Mock implements _i9.GetLessonsUseCase { @override _i3.Future<List<_i4.LessonEntity>> call({void params}) => (super.noSuchMethod( Invocation.method( #call, [], {#params: params}, ), returnValue: Future<List<_i4.LessonEntity>>.value(<_i4.LessonEntity>[]), ) as _i3.Future<List<_i4.LessonEntity>>);}
I tried to declare it with returnNullOrMissing
, but still not working
@GenerateMocks([ LessonsRepository, // GetLessonsUseCase, SetDrawerBadgesUseCase, GetYoutubeIconUseCase,], customMocks: [ MockSpec<GetLessonsUseCase>(returnNullOnMissingStub: true),])