From 801ddd95893efc64d08201519c532ef9858c2156 Mon Sep 17 00:00:00 2001 From: Vadim Date: Thu, 15 Jun 2023 23:09:43 +0200 Subject: [PATCH] fixed running all tests --- test/screens/metering/bloc_metering_test.dart | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/screens/metering/bloc_metering_test.dart b/test/screens/metering/bloc_metering_test.dart index aefd32a..7e87a27 100644 --- a/test/screens/metering/bloc_metering_test.dart +++ b/test/screens/metering/bloc_metering_test.dart @@ -25,20 +25,17 @@ void main() { late MeteringBloc bloc; const iso100 = IsoValue(100, StopType.full); - setUpAll(() { + setUp(() { meteringInteractor = _MockMeteringInteractor(); - communicationBloc = _MockMeteringCommunicationBloc(); - when(() => meteringInteractor.iso).thenReturn(iso100); when(() => meteringInteractor.ndFilter).thenReturn(NdValue.values.first); when(() => meteringInteractor.film).thenReturn(Film.values.first); - when(meteringInteractor.quickVibration).thenAnswer((_) async {}); when(meteringInteractor.responseVibration).thenAnswer((_) async {}); when(meteringInteractor.errorVibration).thenAnswer((_) async {}); - }); - setUp(() { + communicationBloc = _MockMeteringCommunicationBloc(); + bloc = MeteringBloc( meteringInteractor, communicationBloc, @@ -47,6 +44,7 @@ void main() { tearDown(() { bloc.close(); + communicationBloc.close(); }); group(