public void DeleteCollectionOfTracksTest() { const int NumberOfTracks = 10; var tracks = InsertTracks(NumberOfTracks); var allTracks = trackDao.ReadAll(); Assert.IsTrue(allTracks.Count == NumberOfTracks); foreach (var track in tracks) { trackDao.DeleteTrack(track.TrackReference); } Assert.IsTrue(trackDao.ReadAll().Count == 0); }
public void DeleteCollectionOfTracksTest() { const int numberOfTracks = 10; InsertTracks(numberOfTracks); var allTracks = trackDao.ReadAll().ToList(); Assert.IsTrue(allTracks.Count == numberOfTracks); foreach (var track in allTracks) { trackDao.DeleteTrack(track.TrackReference); } Assert.IsFalse(trackDao.ReadAll().Any()); }
public void DeleteCollectionOfTracksTest() { const int numberOfTracks = 10; InsertTracks(numberOfTracks); var allTracks = trackDao.GetTrackIds().ToList(); Assert.IsTrue(allTracks.Count == numberOfTracks); foreach (var track in allTracks.Select(trackId => trackDao.ReadTrackById(trackId))) { Assert.IsNotNull(track); trackDao.DeleteTrack(track.TrackReference); } Assert.IsFalse(trackDao.GetTrackIds().Any()); }
public virtual int DeleteTrack(IModelReference trackReference) { return(trackDao.DeleteTrack(trackReference)); }
public int DeleteTrack(IModelReference trackReference) { return(trackDao.DeleteTrack(((ModelReference <int>)trackReference).Id)); }