Exemple #1
0
        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);
        }
Exemple #2
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());
        }
Exemple #3
0
        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());
        }
Exemple #4
0
 public virtual int DeleteTrack(IModelReference trackReference)
 {
     return(trackDao.DeleteTrack(trackReference));
 }
 public int DeleteTrack(IModelReference trackReference)
 {
     return(trackDao.DeleteTrack(((ModelReference <int>)trackReference).Id));
 }