public void Teste_EventoRepositorio_DeletarEventoComIdInvalido_DeveSerThrowException()
        {
            _evento    = ObjectMother.RetorneEventoExistenteOk(_funcionario, _sala);
            _evento.Id = 0;
            Action action = () => _repositorio.Deletar(_evento);

            action.Should().Throw <IdentifierUndefinedException>();
        }
Ejemplo n.º 2
0
 public void Deletar(Evento evento)
 {
     if (evento.Id <= 0)
     {
         throw new IdentifierUndefinedException();
     }
     _eventoRepositorio.Deletar(evento);
 }