public void Repository_Snack_deveria_deletar_um_snack() { //Arrange Snack newSnack = _repository.Add(_snack); //Action _repository.Delete(newSnack.Id); //Assert Snack result = _repository.GetById(newSnack.Id); result.Should().BeNull(); }
internal Snack Delete(int id) { Snack snack = Get(id); _repo.Delete(snack); return(snack); }