Skip to content

Commit

Permalink
Update json_serialization_and_deserialization_test.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
marcglasberg committed Mar 26, 2024
1 parent caba0a3 commit 4cc9ef8
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@ void main() {

test('can serialize IList of enums', () {
expect(IListWrapper2(IList<TestEnum>()).toJson(), {'iList': <TestEnum>[]});
expect(IListWrapper2(IList([TestEnum.valA, TestEnum.valB, TestEnum.valC])).toJson(), {
'iList': <TestEnum>[TestEnum.valA, TestEnum.valB, TestEnum.valC]
});

expect(
IListWrapper2(IList([TestEnum.valA, TestEnum.valB, TestEnum.valC])).toJson(),
anyOf({
'iList': <TestEnum>[TestEnum.valA, TestEnum.valB, TestEnum.valC]
}, {
'iList': ['valA', 'valB', 'valC']
}));
});

test('can deserialize IList of enums', () {
Expand Down

0 comments on commit 4cc9ef8

Please sign in to comment.