public void EmprestimoRepositorio_Delete_ShouldBeOk() { int idSearch = 1; Emprestimo emprestimo = _repositorio.Get(idSearch); _repositorio.Delete(emprestimo); Emprestimo result = _repositorio.Get(idSearch); result.Should().BeNull(); }
public void Delete(Emprestimo emprestimo) { if (emprestimo.Id < 1) { throw new ExcecaoIdentifivadorIndefinido(); } _repositorio.Delete(emprestimo); }