use of br.com.caelum.agiletickets.models.Espetaculo in project agiletickets by caelum.
the class EspetaculosController method carregaEspetaculo.
private Espetaculo carregaEspetaculo(Long espetaculoId) {
Espetaculo espetaculo = agenda.espetaculo(espetaculoId);
if (espetaculo == null) {
validator.add(new ValidationMessage("", ""));
}
validator.onErrorUse(status()).notFound();
return espetaculo;
}
use of br.com.caelum.agiletickets.models.Espetaculo in project agiletickets by caelum.
the class EspetaculosControllerTest method naoDeveCadastrarEspetaculosSemNome.
@Test(expected = ValidationException.class)
public void naoDeveCadastrarEspetaculosSemNome() throws Exception {
Espetaculo espetaculo = new Espetaculo();
espetaculo.setDescricao("uma descricao");
controller.adiciona(espetaculo);
verifyZeroInteractions(agenda);
}
use of br.com.caelum.agiletickets.models.Espetaculo in project agiletickets by caelum.
the class EspetaculosControllerTest method naoDeveCadastrarEspetaculosSemDescricao.
@Test(expected = ValidationException.class)
public void naoDeveCadastrarEspetaculosSemDescricao() throws Exception {
Espetaculo espetaculo = new Espetaculo();
espetaculo.setNome("um nome");
controller.adiciona(espetaculo);
verifyZeroInteractions(agenda);
}
use of br.com.caelum.agiletickets.models.Espetaculo in project agiletickets by caelum.
the class SessaoTestDataBuilder method deUmEspetaculoDoTipo.
public SessaoTestDataBuilder deUmEspetaculoDoTipo(TipoDeEspetaculo tipo) {
this.espetaculo = new Espetaculo();
this.espetaculo.setTipo(tipo);
return this;
}
Aggregations