public void Test_Basic() { FullAlbumPlayList target = new FullAlbumPlayList("Test"); target.PlayListname.Should().Be("Test"); target.ReadOnlyTracks.Should().BeEmpty(); target.Albums.Should().BeEmpty(); target.CurrentAlbumItem.Should().BeNull(); target.CurrentTrack.Should().BeNull(); target.AutoReplay.Should().BeFalse(); target.MonitorEvents(); target.PlayListname = "toto"; target.PlayListname.Should().Be("toto"); target.ShouldRaisePropertyChangeFor(x=>x.PlayListname); target.AutoReplay = true; target.AutoReplay.Should().BeTrue(); target.ShouldRaisePropertyChangeFor(x => x.AutoReplay); target.Init(); target.CurrentAlbumItem.Should().BeNull(); target.CurrentTrack.Should().BeNull(); target.Transition(); target.CurrentAlbumItem.Should().BeNull(); target.CurrentTrack.Should().BeNull(); target.Dispose(); }
public void Test_Event2() { FullAlbumPlayList target = new FullAlbumPlayList("Test"); IAlbum al1 = SubstiteBuilder.ForAlbum(5); target.AddAlbum(al1); target.Init(); target.MonitorEvents(); target.Transition(); target.CurrentAlbumItem.Should().NotBeNull(); target.ShouldRaise("SelectionChanged").WithSender(target); }