BeniaminoBaggins
BeniaminoBaggins

Reputation: 12483

Mockito not generating mocks

I had some existing mocks with mockito. I changed the names of some classes that had been mocked and now mockito doesn't generate mocks for them anymore.

An example is:

import 'package:mockito/annotations.dart';
import 'package:vepo/src/presentation/pages/manage_vegan_items/page/helpers/manage_vegan_items_page_vm.dart';

@GenerateMocks([ManageVgnItmsPageVm])
void main() {}

It is imported without error. After running flutter pub run build_runner build, no mocks have been generated for the newly named classes. The app runs fine. Does anyone know what might have caused mockito not to generate the mock files?

Upvotes: 5

Views: 2564

Answers (1)

Related Questions