fixed running all tests

This commit is contained in:
Vadim 2023-06-15 23:09:43 +02:00
parent 604ee097a6
commit 801ddd9589

View file

@ -25,20 +25,17 @@ void main() {
late MeteringBloc bloc; late MeteringBloc bloc;
const iso100 = IsoValue(100, StopType.full); const iso100 = IsoValue(100, StopType.full);
setUpAll(() { setUp(() {
meteringInteractor = _MockMeteringInteractor(); meteringInteractor = _MockMeteringInteractor();
communicationBloc = _MockMeteringCommunicationBloc();
when<IsoValue>(() => meteringInteractor.iso).thenReturn(iso100); when<IsoValue>(() => meteringInteractor.iso).thenReturn(iso100);
when<NdValue>(() => meteringInteractor.ndFilter).thenReturn(NdValue.values.first); when<NdValue>(() => meteringInteractor.ndFilter).thenReturn(NdValue.values.first);
when<Film>(() => meteringInteractor.film).thenReturn(Film.values.first); when<Film>(() => meteringInteractor.film).thenReturn(Film.values.first);
when(meteringInteractor.quickVibration).thenAnswer((_) async {}); when(meteringInteractor.quickVibration).thenAnswer((_) async {});
when(meteringInteractor.responseVibration).thenAnswer((_) async {}); when(meteringInteractor.responseVibration).thenAnswer((_) async {});
when(meteringInteractor.errorVibration).thenAnswer((_) async {}); when(meteringInteractor.errorVibration).thenAnswer((_) async {});
});
setUp(() { communicationBloc = _MockMeteringCommunicationBloc();
bloc = MeteringBloc( bloc = MeteringBloc(
meteringInteractor, meteringInteractor,
communicationBloc, communicationBloc,
@ -47,6 +44,7 @@ void main() {
tearDown(() { tearDown(() {
bloc.close(); bloc.close();
communicationBloc.close();
}); });
group( group(