public void ExcecaoQuandoExcluiClienteInexistente()
        {
            var    repositoryStub = new CostumerRepositoryStub();
            var    service        = new CostumerService(repositoryStub);
            string idExistente    = "01";

            var mensagemEsperada = "Cliente inexistente para exclusão.";

            var exception = Assert.Throws <InvalidServiceRequestException>(() => service.Remove(idExistente));

            Assert.Equal(mensagemEsperada, exception.Message);
        }
Ejemplo n.º 2
0
 public void Delete(string id)
 {
     service.Remove(id);
 }