11import 'package:flutter/material.dart' ;
22import 'package:flutter_test/flutter_test.dart' ;
3- import 'package:matcher/src/feature_matcher.dart' ;
43import 'package:mockingjay/mockingjay.dart' ;
54
65class NonModalRoute extends Mock implements TransitionRoute <void > {}
@@ -46,20 +45,8 @@ void main() {
4645 }
4746
4847 group ('constructor' , () {
49- test ('wraps deprecated name value in equals matcher' , () {
50- expect (
51- // ignore: deprecated_member_use_from_same_package
52- isRoute (named: '/test' ),
53- isA <dynamic >().having (
54- // ignore: avoid_dynamic_calls
55- (dynamic m) => m.whereName,
56- 'whereName' ,
57- isA <FeatureMatcher <String >>(),
58- ),
59- );
60- });
61-
62- test ('throws AssertionError when both whereSettings '
48+ test (
49+ 'throws AssertionError when both whereSettings '
6350 'and whereName or whereArguments matchers are provided' , () {
6451 expect (
6552 () => isRoute (
@@ -147,7 +134,8 @@ void main() {
147134 );
148135 });
149136
150- test ('does not match anything that is not a route '
137+ test (
138+ 'does not match anything that is not a route '
151139 'with matching settings' , () {
152140 expectToFail (
153141 createRoute <dynamic >(name: '/test' ),
@@ -232,15 +220,13 @@ is a route where the route's `name` is different.
232220 expectToFail (
233221 createRoute <dynamic >(arguments: {'a' : 1 }),
234222 isRoute (whereArguments: equals ({'a' : 2 })),
235- withMessage:
236- "is a route where the route's `arguments` "
223+ withMessage: "is a route where the route's `arguments` "
237224 "at location ['a'] is <1> instead of <2>" ,
238225 );
239226 expectToFail (
240227 createRoute <dynamic >(arguments: {'a' : 1 }),
241228 isRoute (whereArguments: equals ({'b' : 1 })),
242- withMessage:
243- "is a route where the route's `arguments` "
229+ withMessage: "is a route where the route's `arguments` "
244230 "is missing map key 'b'" ,
245231 );
246232 expectToFail (
@@ -257,20 +243,19 @@ is a route where the route's `name` is different.
257243 expect (createRoute <dynamic >(), isRoute (whereMaintainState: isTrue));
258244 });
259245
260- test ('does not match anything that is not a route with matching '
246+ test (
247+ 'does not match anything that is not a route with matching '
261248 'maintainState argument' , () {
262249 expectToFail (
263250 createRoute <dynamic >(),
264251 isRoute (whereMaintainState: isFalse),
265- withMessage:
266- 'is a route where `maintainState` '
252+ withMessage: 'is a route where `maintainState` '
267253 'is true instead of false' ,
268254 );
269255 expectToFail (
270256 NonModalRoute (),
271257 isRoute (whereMaintainState: isTrue),
272- withMessage:
273- 'is a route where `maintainState` '
258+ withMessage: 'is a route where `maintainState` '
274259 'is not a property on `NonModalRoute` and can only be used '
275260 'with `ModalRoute`s' ,
276261 );
@@ -290,20 +275,19 @@ is a route where the route's `name` is different.
290275 );
291276 });
292277
293- test ('does not match anything that is not a route with matching '
278+ test (
279+ 'does not match anything that is not a route with matching '
294280 'fullscreenDialog argument' , () {
295281 expectToFail (
296282 createRoute <dynamic >(fullscreenDialog: true ),
297283 isRoute (whereFullscreenDialog: isFalse),
298- withMessage:
299- 'is a route where `fullscreenDialog` '
284+ withMessage: 'is a route where `fullscreenDialog` '
300285 'is true instead of false' ,
301286 );
302287 expectToFail (
303288 NonModalRoute (),
304289 isRoute (whereFullscreenDialog: isFalse),
305- withMessage:
306- 'is a route where `fullscreenDialog` '
290+ withMessage: 'is a route where `fullscreenDialog` '
307291 'is not a property on `NonModalRoute` and can only be used '
308292 'with `PageRoute`s' ,
309293 );
0 commit comments