Skip to content

Commit 77bc017

Browse files
committed
fix formatting
1 parent 306e492 commit 77bc017

1 file changed

Lines changed: 28 additions & 6 deletions

File tree

packages/dart_mappable/test/serialization/basic_serialization_test.dart

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,49 @@ enum B { a, bB, ccCc }
2424
void main() {
2525
group('basic serialization', () {
2626
test('from map succeeds', () {
27-
expect(AMapper.fromMap({'a': 'hi', 'd': false}), equals(A('hi', d: false)));
28-
expect(AMapper.fromMap({'a': 'test', 'b': 1, 'c': 0.5, 'd': true}), equals(A('test', b: 1, c: 0.5, d: true)));
27+
expect(
28+
AMapper.fromMap({'a': 'hi', 'd': false}),
29+
equals(A('hi', d: false)),
30+
);
31+
expect(
32+
AMapper.fromMap({'a': 'test', 'b': 1, 'c': 0.5, 'd': true}),
33+
equals(A('test', b: 1, c: 0.5, d: true)),
34+
);
2935
});
3036

3137
test('from map throws', () {
3238
expect(
3339
() => AMapper.fromMap({'a': 'hi'}),
3440
throwsMapperException(
35-
MapperException.chain(MapperMethod.decode, '(A).d', MapperException.missingParameter('d')),
41+
MapperException.chain(
42+
MapperMethod.decode,
43+
'(A).d',
44+
MapperException.missingParameter('d'),
45+
),
3646
),
3747
);
3848

3949
expect(
4050
() => AMapper.fromMap({'a': 'ok', 'b': 'fail', 'd': false}),
41-
throwsMapperException(MapperException.chain(MapperMethod.decode, '(A).b(int?)', FormatException('fail'))),
51+
throwsMapperException(
52+
MapperException.chain(
53+
MapperMethod.decode,
54+
'(A).b(int?)',
55+
FormatException('fail'),
56+
),
57+
),
4258
);
4359
});
4460

4561
test('to map succeeds', () {
46-
expect(A('hi', d: false, e: B.bB).toMap(), equals({'a': 'hi', 'b': 0, 'c': null, 'd': false, 'e': 'bB'}));
47-
expect(A('test', b: 1, c: 0.5, d: true).toMap(), equals({'a': 'test', 'b': 1, 'c': 0.5, 'd': true, 'e': null}));
62+
expect(
63+
A('hi', d: false, e: B.bB).toMap(),
64+
equals({'a': 'hi', 'b': 0, 'c': null, 'd': false, 'e': 'bB'}),
65+
);
66+
expect(
67+
A('test', b: 1, c: 0.5, d: true).toMap(),
68+
equals({'a': 'test', 'b': 1, 'c': 0.5, 'd': true, 'e': null}),
69+
);
4870
});
4971
});
5072
}

0 commit comments

Comments
 (0)