Created
November 20, 2020 03:22
-
-
Save GuilhermeManzano/476243e5c5d0fdd292c5a6ebb8da12ef to your computer and use it in GitHub Desktop.
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
@Test | |
public void testLocacao_filmeSemEstoque_2(){ | |
// cenario | |
LocacaoService service = new LocacaoService(); | |
Usuario usuario = new Usuario("Usuario 1"); | |
Filme filme = new Filme("Filme 1", 2, 5.0); | |
// açao | |
try { | |
service.alugarFilme(usuario, filme); | |
Assert.fail("Deveria ter lançado uma exceção"); | |
} catch (Exception e) { | |
Assert.assertThat(e.getMessage(), is("Filme sem estoque")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment