public void InsertGenre_NormalFlow() { var genre = new Genre() { Name = "MyTestGenre" + Guid.NewGuid().ToString() }; genre.GenreId = _genresRepository2.Insert(genre); var newRecord = _genresRepository2.Get(genre.GenreId); genre.ShouldBeEquivalentTo(newRecord); }
public void DeleteGenreByID_DeleteById() { var genre = new Genre() { Name = "DeleteTest" }; var idOfInsertedGenre = _genresRepository2.Insert(genre); _genresRepository2.Delete(idOfInsertedGenre); var retrievedRecord = _genresRepository2.Get(idOfInsertedGenre); Assert.AreEqual(null, retrievedRecord); }
public void Update(Genre genre) { _genresRepository2.Update(genre); }
public void Insert(Genre genre) { _genresRepository2.Insert(genre); }