public void Repository_Snack_deveria_alterar_um_novo_snack() { //Arrange Snack newSnack = _repository.Add(_snack); newSnack.Name = "Name"; //Action _repository.Update(newSnack); //Assert Snack result = _repository.GetById(newSnack.Id); result.Name.Should().Be(newSnack.Name); }
public void Snacks_Repository_Should_Update_Sucessfully() { // Arrange var modified = false; var newValue = "newName"; _snackBase.Name = newValue; //Action _repository.Update(_snackBase); var act = new Action(() => { modified = _repository.Save(); }); // Assert act.Should().NotThrow <Exception>(); modified.Should().BeTrue(); }