Showing
6 changed files
with
13 additions
and
14 deletions
| @@ -14,7 +14,9 @@ enum EncryptionType { | @@ -14,7 +14,9 @@ enum EncryptionType { | ||
| 14 | 14 | ||
| 15 | const EncryptionType(this.rawValue); | 15 | const EncryptionType(this.rawValue); |
| 16 | 16 | ||
| 17 | - @Deprecated('EncryptionType.none is deprecated. Use EncryptionType.unknown instead.') | 17 | + @Deprecated( |
| 18 | + 'EncryptionType.none is deprecated. Use EncryptionType.unknown instead.', | ||
| 19 | + ) | ||
| 18 | static const EncryptionType none = EncryptionType.unknown; | 20 | static const EncryptionType none = EncryptionType.unknown; |
| 19 | 21 | ||
| 20 | factory EncryptionType.fromRawValue(int value) { | 22 | factory EncryptionType.fromRawValue(int value) { |
| @@ -21,8 +21,8 @@ void main() { | @@ -21,8 +21,8 @@ void main() { | ||
| 21 | const int negative = -1; | 21 | const int negative = -1; |
| 22 | const int outOfRange = 3; | 22 | const int outOfRange = 3; |
| 23 | 23 | ||
| 24 | - expect(() => AddressType.fromRawValue(negative), AddressType.unknown); | ||
| 25 | - expect(() => AddressType.fromRawValue(outOfRange), AddressType.unknown); | 24 | + expect(AddressType.fromRawValue(negative), AddressType.unknown); |
| 25 | + expect(AddressType.fromRawValue(outOfRange), AddressType.unknown); | ||
| 26 | }); | 26 | }); |
| 27 | 27 | ||
| 28 | test('can be converted to raw value', () { | 28 | test('can be converted to raw value', () { |
| @@ -31,8 +31,8 @@ void main() { | @@ -31,8 +31,8 @@ void main() { | ||
| 31 | const int negative = -1; | 31 | const int negative = -1; |
| 32 | const int outOfRange = 13; | 32 | const int outOfRange = 13; |
| 33 | 33 | ||
| 34 | - expect(() => BarcodeType.fromRawValue(negative), BarcodeType.unknown); | ||
| 35 | - expect(() => BarcodeType.fromRawValue(outOfRange), BarcodeType.unknown); | 34 | + expect(BarcodeType.fromRawValue(negative), BarcodeType.unknown); |
| 35 | + expect(BarcodeType.fromRawValue(outOfRange), BarcodeType.unknown); | ||
| 36 | }); | 36 | }); |
| 37 | 37 | ||
| 38 | test('can be converted to raw value', () { | 38 | test('can be converted to raw value', () { |
| @@ -21,8 +21,8 @@ void main() { | @@ -21,8 +21,8 @@ void main() { | ||
| 21 | const int negative = -1; | 21 | const int negative = -1; |
| 22 | const int outOfRange = 3; | 22 | const int outOfRange = 3; |
| 23 | 23 | ||
| 24 | - expect(() => EmailType.fromRawValue(negative), EmailType.unknown); | ||
| 25 | - expect(() => EmailType.fromRawValue(outOfRange), EmailType.unknown); | 24 | + expect(EmailType.fromRawValue(negative), EmailType.unknown); |
| 25 | + expect(EmailType.fromRawValue(outOfRange), EmailType.unknown); | ||
| 26 | }); | 26 | }); |
| 27 | 27 | ||
| 28 | test('can be converted to raw value', () { | 28 | test('can be converted to raw value', () { |
| @@ -22,11 +22,8 @@ void main() { | @@ -22,11 +22,8 @@ void main() { | ||
| 22 | const int negative = -1; | 22 | const int negative = -1; |
| 23 | const int outOfRange = 4; | 23 | const int outOfRange = 4; |
| 24 | 24 | ||
| 25 | - expect(() => EncryptionType.fromRawValue(negative), EncryptionType.unknown); | ||
| 26 | - expect( | ||
| 27 | - () => EncryptionType.fromRawValue(outOfRange), | ||
| 28 | - EncryptionType.unknown, | ||
| 29 | - ); | 25 | + expect(EncryptionType.fromRawValue(negative), EncryptionType.unknown); |
| 26 | + expect(EncryptionType.fromRawValue(outOfRange), EncryptionType.unknown); | ||
| 30 | }); | 27 | }); |
| 31 | 28 | ||
| 32 | test('can be converted to raw value', () { | 29 | test('can be converted to raw value', () { |
| @@ -23,8 +23,8 @@ void main() { | @@ -23,8 +23,8 @@ void main() { | ||
| 23 | const int negative = -1; | 23 | const int negative = -1; |
| 24 | const int outOfRange = 5; | 24 | const int outOfRange = 5; |
| 25 | 25 | ||
| 26 | - expect(() => PhoneType.fromRawValue(negative), PhoneType.unknown); | ||
| 27 | - expect(() => PhoneType.fromRawValue(outOfRange), PhoneType.unknown); | 26 | + expect(PhoneType.fromRawValue(negative), PhoneType.unknown); |
| 27 | + expect(PhoneType.fromRawValue(outOfRange), PhoneType.unknown); | ||
| 28 | }); | 28 | }); |
| 29 | 29 | ||
| 30 | test('can be converted to raw value', () { | 30 | test('can be converted to raw value', () { |
-
Please register or login to post a comment