Questions tagged [dart-mockito]
3 questions
3
votes
1 answer
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…

BeniaminoBaggins
- 11,202
- 41
- 152
- 287
0
votes
1 answer
No matching calls with Mockito verify despite call matches
I have a provider named SqliteFavoriteProvider and it has a method named add, it is as shown:
@override
Future add({
required int startStationId,
required int endStationId,
int? dayId,
}) async {
// `_database` here will…

Eray Erdin
- 2,633
- 1
- 32
- 66
0
votes
1 answer
How to unit test my service without passing in Dio object as argument?
I am trying to create wrapper (SDK) below, and the code okay, but when I want to unit test using Mockito I have problem, because in order to use I need to pass in MockDio as an argument, and this can be the problem because I don't want user to…

Alvin
- 8,219
- 25
- 96
- 177