Na aula 04, atividade 1 no fim da aula após trocar o ContactLIst para Stateful, o teste falha,
segue o erro:
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TestFailure object was thrown running a test:
No matching calls. All calls: [VERIFIED] MockContactDao.findAll(), [VERIFIED]
MockContactDao.save(Contact{id: 0, name: Alex, accountNumber: 1000})
(If you called `verify(...).called(0);`, please instead use `verifyNever(...);`.)
When the exception was thrown, this was the stack:
#0 fail (package:test_api/src/frontend/expect.dart:155:31)
#1 _VerifyCall._checkWith (package:mockito/src/mock.dart:631:7)
#2 _makeVerify.<anonymous closure> (package:mockito/src/mock.dart:926:18)
#3 main.<anonymous closure> (file:///home/aloizio/Documentos/flutter-webapi-initial-project/test/save_contact_flow.dart:65:11)
<asynchronous suspension>
#4 main.<anonymous closure> (file:///home/aloizio/Documentos/flutter-webapi-initial-project/test/save_contact_flow.dart)
#5 testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:146:29)
<asynchronous suspension>
#6 testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart)
#7 TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:784:19)
<asynchronous suspension>
#10 TestWidgetsFlutterBinding._runTest (package:flutter_test/src/binding.dart:764:14)
#11 AutomatedTestWidgetsFlutterBinding.runTest.<anonymous closure> (package:flutter_test/src/binding.dart:1173:24)
#12 FakeAsync.run.<anonymous closure>.<anonymous closure> (package:fake_async/fake_async.dart:178:54)
#17 withClock (package:clock/src/default.dart:48:10)
#18 FakeAsync.run.<anonymous closure> (package:fake_async/fake_async.dart:178:22)
#23 FakeAsync.run (package:fake_async/fake_async.dart:178:7)
#24 AutomatedTestWidgetsFlutterBinding.runTest (package:flutter_test/src/binding.dart:1170:15)
#25 testWidgets.<anonymous closure> (package:flutter_test/src/widget_tester.dart:138:24)
#26 Declarer.test.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/declarer.dart:175:19)
<asynchronous suspension>
#27 Declarer.test.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/declarer.dart)
#32 Declarer.test.<anonymous closure> (package:test_api/src/backend/declarer.dart:173:13)
#33 Invoker.waitForOutstandingCallbacks.<anonymous closure> (package:test_api/src/backend/invoker.dart:231:15)
#38 Invoker.waitForOutstandingCallbacks (package:test_api/src/backend/invoker.dart:228:5)
#39 Invoker._onRun.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/invoker.dart:383:17)
<asynchronous suspension>
#40 Invoker._onRun.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/invoker.dart)
#45 Invoker._onRun.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/invoker.dart:370:9)
#46 Invoker._guardIfGuarded (package:test_api/src/backend/invoker.dart:415:15)
#47 Invoker._onRun.<anonymous closure> (package:test_api/src/backend/invoker.dart:369:7)
#54 Invoker._onRun (package:test_api/src/backend/invoker.dart:368:11)
#55 LiveTestController.run (package:test_api/src/backend/live_test_controller.dart:153:11)
#56 RemoteListener._runLiveTest.<anonymous closure> (package:test_api/src/remote_listener.dart:256:16)
#61 RemoteListener._runLiveTest (package:test_api/src/remote_listener.dart:255:5)
#62 RemoteListener._serializeTest.<anonymous closure> (package:test_api/src/remote_listener.dart:208:7)
#80 _GuaranteeSink.add (package:stream_channel/src/guarantee_channel.dart:125:12)
#81 new _MultiChannel.<anonymous closure> (package:stream_channel/src/multi_channel.dart:159:31)
#85 CastStreamSubscription._onData (dart:_internal/async_cast.dart:85:11)
#119 new _WebSocketImpl._fromSocket.<anonymous closure> (dart:_http/websocket_impl.dart:1145:21)
#127 _WebSocketProtocolTransformer._messageFrameEnd (dart:_http/websocket_impl.dart:338:23)
#128 _WebSocketProtocolTransformer.add (dart:_http/websocket_impl.dart:232:46)
#138 _Socket._onData (dart:io-patch/socket_patch.dart:2044:41)
#147 new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1580:33)
#148 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1076:14)
(elided 111 frames from dart:async and package:stack_trace)
The test description was:
Should save a contact
════════════════════════════════════════════════════════════════════════════════════════════════════
Test failed. See exception logs above.
The test description was: Should save a contact
Podem me ajudar? Mesmo puxando o projeto final, o erro continua.