コード例 #1
0
        public void TestIsPresent()
        {
            var originalCollection = new TrackCollection();

            Assert.IsFalse(originalCollection.IsPresent(_testTrack));
            originalCollection.Add(_testTrack);
            Assert.IsTrue(originalCollection.IsPresent(_testTrack));
        }
コード例 #2
0
        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();
 }