Last active
December 27, 2018 18:07
-
-
Save praser/c857ffab96dd454f4538485dcacc9ca7 to your computer and use it in GitHub Desktop.
Exemplo TDD - Primeiro Teste
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static org.junit.jupiter.api.Assertions.assertEquals; | |
import org.junit.jupiter.api.Test; | |
public class ComissaoTeste { | |
@Test | |
public void testeUmaVendaDeDezMilPagaComissaoDeQuinhentos() { | |
//Arrange | |
Comissao comissao = new Comissao(); | |
double valorVenda = 10000.00; | |
double valorComissaoEsperado = 500.00; | |
//Act | |
double valorComissaoCalculado = comissao.calcularComissao(valorVenda); | |
//Asseert | |
assertEquals(valorComissaoEsperado, valorComissaoCalculado); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment