@@ -13,33 +13,41 @@ void main() {
1313
1414 const converter = JsonSerializableConverter ({});
1515
16- expect (() => converter.convertResponse <TestModel , TestModel >(response), throwsA (isA <JsonUnsupportedObjectError >()));
16+ expect (() => converter.convertResponse <TestModel , TestModel >(response),
17+ throwsA (isA <JsonUnsupportedObjectError >()));
1718 });
1819
1920 test ('Error is thrown when wrong factory is added' , () {
2021 final response = Response (baseResponse, '{"name":"John"}' );
2122
22- const converter = JsonSerializableConverter ({TestModel : TestModel2 .fromJson});
23+ const converter =
24+ JsonSerializableConverter ({TestModel : TestModel2 .fromJson});
2325
24- expect (() => converter.convertResponse <TestModel , TestModel >(response), throwsA (isA <JsonUnsupportedObjectError >()));
26+ expect (() => converter.convertResponse <TestModel , TestModel >(response),
27+ throwsA (isA <JsonUnsupportedObjectError >()));
2528 });
2629
2730 test ('Uses model to convert json into model' , () async {
2831 final response = Response (baseResponse, '{"name":"John"}' );
2932
30- const converter = JsonSerializableConverter ({TestModel : TestModel .fromJson});
33+ const converter =
34+ JsonSerializableConverter ({TestModel : TestModel .fromJson});
3135
32- final result = await converter.convertResponse <TestModel , TestModel >(response);
36+ final result =
37+ await converter.convertResponse <TestModel , TestModel >(response);
3338
3439 expect (result.body? .name, 'John' );
3540 });
3641
3742 test ('Uses model to convert json into List<model>' , () async {
38- final response = Response (baseResponse, '[{"name":"John"},{"name":"John2"}]' );
43+ final response =
44+ Response (baseResponse, '[{"name":"John"},{"name":"John2"}]' );
3945
40- const converter = JsonSerializableConverter ({TestModel : TestModel .fromJson});
46+ const converter =
47+ JsonSerializableConverter ({TestModel : TestModel .fromJson});
4148
42- final result = await converter.convertResponse <List <TestModel >, TestModel >(response);
49+ final result =
50+ await converter.convertResponse <List <TestModel >, TestModel >(response);
4351
4452 expect (result.body? [0 ].name, 'John' );
4553 expect (result.body? [1 ].name, 'John2' );
@@ -49,7 +57,8 @@ void main() {
4957class TestModel {
5058 TestModel (this .name);
5159
52- factory TestModel .fromJson (Map <String , dynamic > json) => TestModel (json['name' ] as String );
60+ factory TestModel .fromJson (Map <String , dynamic > json) =>
61+ TestModel (json['name' ] as String );
5362
5463 final String name;
5564
@@ -59,7 +68,8 @@ class TestModel {
5968class TestModel2 {
6069 TestModel2 (this .name);
6170
62- factory TestModel2 .fromJson (Map <String , dynamic > json) => TestModel2 (json['name' ] as String );
71+ factory TestModel2 .fromJson (Map <String , dynamic > json) =>
72+ TestModel2 (json['name' ] as String );
6373
6474 final String name;
6575
0 commit comments