Skip to content

Instantly share code, notes, and snippets.

@CristianoRC
Created April 21, 2019 12:23
Show Gist options
  • Save CristianoRC/3b8a0df5c32fec02665a43929edd373e to your computer and use it in GitHub Desktop.
Save CristianoRC/3b8a0df5c32fec02665a43929edd373e to your computer and use it in GitHub Desktop.
test('Deve dar erro ao calcula valor com desconto negativo ou zero', () {
expect(() => calcularDesconto(valorSemDesconto, -1, true),
throwsA(TypeMatcher<ArgumentError>()));
expect(() => calcularDesconto(valorSemDesconto, 0, false),
throwsA(TypeMatcher<ArgumentError>()));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment