Skip to content

Commit

Permalink
validateInputLength test
Browse files Browse the repository at this point in the history
  • Loading branch information
Leocardoso94 committed Oct 13, 2019
1 parent 3e68742 commit 194e2be
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions test/cep_future_test.dart
Expand Up @@ -16,13 +16,18 @@ void main() {
expect(removeSpecialCharacters('-055-16,'), '05516');
});

// test('validateInputLength', () {
// expect(validateInputLength('12345'), '12345');
// expect(
// validateInputLength('12345121212'),
// instamce(matcher),
// );
// });
test('validateInputLength', () {
expect(validateInputLength('12345'), '12345');
expect(validateInputLength('12345678'), '12345678');
});

test('validateInputLength error', () {
try {
validateInputLength('123456789');
} catch (e) {
expect(e.message, 'CEP deve conter exatamente 8 caracteres.');
}
});

test('leftPadWithZeros', () {
expect(leftPadWithZeros('05516'), '00005516');
Expand Down

0 comments on commit 194e2be

Please sign in to comment.