Skip to content

Instantly share code, notes, and snippets.

@GuilhermeManzano
Last active November 20, 2020 03:23
Show Gist options
  • Save GuilhermeManzano/0a8ba2a859fe49f7970de9f6b072c59d to your computer and use it in GitHub Desktop.
Save GuilhermeManzano/0a8ba2a859fe49f7970de9f6b072c59d to your computer and use it in GitHub Desktop.
@Rule
public ExpectedException exception = ExpectedException.none();
@Test
public void testLocacao_filmeSemEstoque_3() throws Exception {
// cenario
LocacaoService service = new LocacaoService();
Usuario usuario = new Usuario("Usuario 1");
Filme filme = new Filme("Filme 1", 0, 5.0);
exception.expect(Exception.class);
exception.expectMessage("Filme sem estoque");
// açao
service.alugarFilme(usuario, filme);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment