@@ -79,20 +79,24 @@ void main() {
7979 when (() => routeMock.parent).thenReturn ('/' );
8080 when (() => routeMock.schema).thenReturn ('/' );
8181 when (() => routeMock.middlewares).thenReturn ([Guard ()]);
82- when (() => routeMock.copyWith (schema: any (named: 'schema' ))).thenReturn (routeMock);
82+ when (() => routeMock.copyWith (schema: any (named: 'schema' )))
83+ .thenReturn (routeMock);
8384
8485 final routeParent = ParallelRouteMock ();
8586 when (() => routeParent.uri).thenReturn (Uri .parse ('/' ));
8687 when (() => routeParent.parent).thenReturn ('' );
8788 when (() => routeParent.schema).thenReturn ('' );
8889 when (() => routeParent.middlewares).thenReturn ([Guard ()]);
89- when (() => routeParent.copyWith (schema: any (named: 'schema' ))).thenReturn (routeParent);
90+ when (() => routeParent.copyWith (schema: any (named: 'schema' )))
91+ .thenReturn (routeParent);
9092
9193 when (() => reportPush (routeMock)).thenReturn (right (unit));
9294 when (() => reportPush (routeParent)).thenReturn (right (unit));
9395
94- when (() => getRoute.call (RouteParmsDTO (url: '/test' ))).thenAnswer ((_) async => right (routeMock));
95- when (() => getRoute.call (RouteParmsDTO (url: '/' ))).thenAnswer ((_) async => right (routeParent));
96+ when (() => getRoute.call (RouteParmsDTO (url: '/test' )))
97+ .thenAnswer ((_) async => right (routeMock));
98+ when (() => getRoute.call (RouteParmsDTO (url: '/' )))
99+ .thenAnswer ((_) async => right (routeParent));
96100 when (() => getArguments.call ()).thenReturn (right (ModularArguments .empty ()));
97101
98102 when (() => setArguments.call (any ())).thenReturn (right (unit));
@@ -112,21 +116,26 @@ void main() {
112116 when (() => routeMock.parent).thenReturn ('/' );
113117 when (() => routeMock.schema).thenReturn ('/' );
114118 when (() => routeMock.middlewares).thenReturn ([Guard ()]);
115- when (() => routeMock.copyWith (schema: any (named: 'schema' ))).thenReturn (routeMock);
119+ when (() => routeMock.copyWith (schema: any (named: 'schema' )))
120+ .thenReturn (routeMock);
116121
117122 final routeParent = ParallelRouteMock ();
118123 when (() => routeParent.uri).thenReturn (Uri .parse ('/' ));
119124 when (() => routeParent.parent).thenReturn ('' );
120125 when (() => routeParent.schema).thenReturn ('' );
121126 when (() => routeParent.middlewares).thenReturn ([Guard ()]);
122- when (() => routeParent.copyWith (schema: any (named: 'schema' ))).thenReturn (routeParent);
127+ when (() => routeParent.copyWith (schema: any (named: 'schema' )))
128+ .thenReturn (routeParent);
123129
124130 when (() => reportPush (routeMock)).thenReturn (right (unit));
125131 when (() => reportPush (routeParent)).thenReturn (right (unit));
126132
127- when (() => getRoute.call (RouteParmsDTO (url: '/oo' ))).thenAnswer ((_) async => right (redirect));
128- when (() => getRoute.call (RouteParmsDTO (url: '/test' , arguments: args))).thenAnswer ((_) async => right (routeMock));
129- when (() => getRoute.call (RouteParmsDTO (url: '/' ))).thenAnswer ((_) async => right (routeParent));
133+ when (() => getRoute.call (RouteParmsDTO (url: '/oo' )))
134+ .thenAnswer ((_) async => right (redirect));
135+ when (() => getRoute.call (RouteParmsDTO (url: '/test' , arguments: args)))
136+ .thenAnswer ((_) async => right (routeMock));
137+ when (() => getRoute.call (RouteParmsDTO (url: '/' )))
138+ .thenAnswer ((_) async => right (routeParent));
130139 when (() => getArguments.call ()).thenReturn (right (args));
131140
132141 when (() => setArguments.call (any ())).thenReturn (right (unit));
@@ -148,8 +157,10 @@ void main() {
148157
149158 when (() => reportPush (routeMock)).thenReturn (right (unit));
150159
151- when (() => getRoute.call (RouteParmsDTO (url: '/test' , arguments: args))).thenAnswer ((_) async => left (ModularPageException ('' )));
152- when (() => getRoute.call (RouteParmsDTO (url: '/test/' , arguments: args))).thenAnswer ((_) async => right (routeMock));
160+ when (() => getRoute.call (RouteParmsDTO (url: '/test' , arguments: args)))
161+ .thenAnswer ((_) async => left (ModularPageException ('' )));
162+ when (() => getRoute.call (RouteParmsDTO (url: '/test/' , arguments: args)))
163+ .thenAnswer ((_) async => right (routeMock));
153164 when (() => getArguments.call ()).thenReturn (right (args));
154165
155166 when (() => setArguments.call (any ())).thenReturn (right (unit));
@@ -176,8 +187,10 @@ void main() {
176187 when (() => getArguments.call ()).thenReturn (right (ModularArguments .empty ()));
177188 when (() => routeMock.middlewares).thenReturn ([Guard ()]);
178189
179- expect (parser.parseRouteInformation (RouteInformation (location: '/test' )), completion (isA <ModularBook >()));
180- expect (parser.parseRouteInformation (RouteInformation (location: '/test' )), completion (isA <ModularBook >()));
190+ expect (parser.parseRouteInformation (RouteInformation (location: '/test' )),
191+ completion (isA <ModularBook >()));
192+ expect (parser.parseRouteInformation (RouteInformation (location: '/test' )),
193+ completion (isA <ModularBook >()));
181194 expect (Guard ().pre (routeMock), routeMock);
182195 });
183196
@@ -189,7 +202,10 @@ void main() {
189202 when (() => routeMock.middlewares).thenReturn ([Guard (false )]);
190203 when (() => routeMock.uri).thenReturn (Uri .parse ('/' ));
191204
192- expect (() async => await parser.parseRouteInformation (RouteInformation (location: '/' )), throwsA (isA <GuardedRouteException >()));
205+ expect (
206+ () async =>
207+ await parser.parseRouteInformation (RouteInformation (location: '/' )),
208+ throwsA (isA <GuardedRouteException >()));
193209 });
194210
195211 test ('parseRouteInformation with location / and middleware null' , () {
@@ -200,7 +216,10 @@ void main() {
200216 when (() => routeMock.middlewares).thenReturn ([MiddlewareNull ()]);
201217 when (() => routeMock.uri).thenReturn (Uri .parse ('/' ));
202218
203- expect (() async => await parser.parseRouteInformation (RouteInformation (location: '/' )), throwsA (isA <Exception >()));
219+ expect (
220+ () async =>
221+ await parser.parseRouteInformation (RouteInformation (location: '/' )),
222+ throwsA (isA <Exception >()));
204223 });
205224
206225 test ('throw error if path be empty' , () {
@@ -215,7 +234,8 @@ void main() {
215234 when (() => routeMock.middlewares).thenReturn ([]);
216235 when (() => routeMock.uri).thenReturn (Uri .parse ('/' ));
217236 when (() => routeMock.parent).thenReturn ('' );
218- when (() => routeMock.copyWith (popCallback: any (named: 'popCallback' ))).thenReturn (routeMock);
237+ when (() => routeMock.copyWith (popCallback: any (named: 'popCallback' )))
238+ .thenReturn (routeMock);
219239 expect (parser.selectBook ('/' , popCallback: (r) {}), completes);
220240 });
221241}
0 commit comments