@@ -77,36 +77,31 @@ void main() {
7777 });
7878
7979 test ('addBreadcrumb' , () async {
80+ final matcher = _nativeUnavailableMatcher (
81+ mockPlatform,
82+ includeLookupSymbol: true ,
83+ includeFailedToLoadClassException: true ,
84+ );
85+
8086 final breadcrumb = Breadcrumb (
8187 data: {'object' : Object ()},
8288 );
83- final normalizedBreadcrumb = Breadcrumb (
84- message: breadcrumb.message,
85- category: breadcrumb.category,
86- data: normalizeMap (breadcrumb.data),
87- level: breadcrumb.level,
88- type: breadcrumb.type,
89- timestamp: breadcrumb.timestamp,
90- // ignore: invalid_use_of_internal_member
91- unknown: breadcrumb.unknown,
92- );
93- when (channel.invokeMethod (
94- 'addBreadcrumb' , {'breadcrumb' : normalizedBreadcrumb.toJson ()}))
95- .thenAnswer ((_) => Future .value ());
9689
97- await sut.addBreadcrumb (breadcrumb);
90+ expect (() => sut.addBreadcrumb (breadcrumb), matcher );
9891
99- verify (channel.invokeMethod (
100- 'addBreadcrumb' , {'breadcrumb' : normalizedBreadcrumb.toJson ()}));
92+ verifyZeroInteractions (channel);
10193 });
10294
10395 test ('clearBreadcrumbs' , () async {
104- when (channel.invokeMethod ('clearBreadcrumbs' ))
105- .thenAnswer ((_) => Future .value ());
96+ final matcher = _nativeUnavailableMatcher (
97+ mockPlatform,
98+ includeLookupSymbol: true ,
99+ includeFailedToLoadClassException: true ,
100+ );
106101
107- await sut.clearBreadcrumbs ();
102+ expect (() => sut.clearBreadcrumbs (), matcher );
108103
109- verify (channel. invokeMethod ( 'clearBreadcrumbs' ) );
104+ verifyZeroInteractions (channel);
110105 });
111106
112107 test ('setContexts' , () async {
0 commit comments