public void TestIsPresent()
        {
            var originalCollection = new TrackCollection();

            Assert.IsFalse(originalCollection.IsPresent(_testTrack));
            originalCollection.Add(_testTrack);
            Assert.IsTrue(originalCollection.IsPresent(_testTrack));
        }
        public void TestRemove()
        {
            var myCollection = new TrackCollection {
                _testTrack
            };

            myCollection.Remove(_testTrack.Path);
            Assert.IsFalse(myCollection.IsPresent(_testTrack));
        }
Пример #3
0
 public void ClearMusicList()
 {
     foreach (Track t in _trackCollection)
     {
         if (!_trackCollection.IsPresent(t))
         {
             _trackCollection.Remove(t.Name);
         }
     }
     Notify();
 }