public void When_AddMusician_is_called_with_then_the_Musician_is_added_to_the_collection() { var entity = MusicianCreator.CreateSingle(); BandCatalog .Expect(catalog => catalog.Add(entity)) .Return(entity) .Repeat.Once(); BandCatalog.Replay(); entity = Repository.AddMusician(entity); Assert.IsNotNull(entity); BandCatalog.VerifyAllExpectations(); }
public void When_UpdateMusician_is_called_with_a_valid_Musician_then_the_Musician_is_updated_in_the_collection() { var entity = MusicianCreator.CreateSingle(); BandCatalog .Expect(catalog => catalog.Update(entity)) .Return(entity) .Repeat.Once(); BandCatalog.Replay(); entity = Repository.UpdateMusician(entity); Assert.IsNotNull(entity); BandCatalog.VerifyAllExpectations(); }