Skip to content

Instantly share code, notes, and snippets.

@praser
Created December 27, 2018 19:08
Show Gist options
  • Save praser/2c9a8ad5c2910d4554b305921af63dd3 to your computer and use it in GitHub Desktop.
Save praser/2c9a8ad5c2910d4554b305921af63dd3 to your computer and use it in GitHub Desktop.
Exemplo TDD - Refatoração após o segundo teste passar
public class Comissao {
private final double BASE_CALCULO_COMISSAO = 10000;
public double calcularComissao(double valorVenda) {
return valorVenda <= BASE_CALCULO_COMISSAO ? 500 : 800.08;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment