Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
What the heck? Let's add all the other billing responses too.
  • Loading branch information
impure committed Dec 21, 2020
commit f93970b6207d1a64dcef5ef4056a106ae117f264
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,54 @@ void main() {
// Make sure that the enum values are supported and that the converter call
// does not fail
group('enumValues', () {
test('enum -3', () async {
test('-3', () async {
BillingResponseConverter converter = BillingResponseConverter();
converter.fromJson(-3);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Could you combine these different assertions into one test? These are different statements, but it's really testing that all the expected values are supported. So I think it makes sense to put them in one test case instead of having one per enum value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, done.

});
test('-2', () async {
BillingResponseConverter converter = BillingResponseConverter();
converter.fromJson(-2);
});
test('-1', () async {
BillingResponseConverter converter = BillingResponseConverter();
converter.fromJson(-1);
});
test('0', () async {
BillingResponseConverter converter = BillingResponseConverter();
converter.fromJson(0);
});
test('1', () async {
BillingResponseConverter converter = BillingResponseConverter();
converter.fromJson(1);
});
test('2', () async {
BillingResponseConverter converter = BillingResponseConverter();
converter.fromJson(2);
});
test('3', () async {
BillingResponseConverter converter = BillingResponseConverter();
converter.fromJson(3);
});
test('4', () async {
BillingResponseConverter converter = BillingResponseConverter();
converter.fromJson(4);
});
test('5', () async {
BillingResponseConverter converter = BillingResponseConverter();
converter.fromJson(5);
});
test('6', () async {
BillingResponseConverter converter = BillingResponseConverter();
converter.fromJson(6);
});
test('7', () async {
BillingResponseConverter converter = BillingResponseConverter();
converter.fromJson(7);
});
test('8', () async {
BillingResponseConverter converter = BillingResponseConverter();
converter.fromJson(8);
});
});

group('startConnection', () {
Expand Down