public void RegisterPlayback_IfPlaybackAdviseIsHighlyRatedSongs_SetsPlaybacksSinceHighlyRatedSongsPlaylistToZero() { // Arrange var target = new PlaylistAdviserMemo(playbacksSinceHighlyRatedSongsPlaylist: 3, playbacksSinceFavoriteAdviseGroup: 5); // Act var newMemo = target.RegisterPlayback(AdvisedPlaylist.ForHighlyRatedSongs(Enumerable.Empty <SongModel>())); // Assert var expectedMemo = new PlaylistAdviserMemo(playbacksSinceHighlyRatedSongsPlaylist: 0, playbacksSinceFavoriteAdviseGroup: 6); newMemo.Should().BeEquivalentTo(expectedMemo); }
public void RegisterPlayback_IfPlaybackIsNotSpeciallyTracked_IncrementsAllPlaybacksCounters() { // Arrange var disc = new DiscModel { Id = new ItemId("1") } .AddToFolder(new FolderModel()); var target = new PlaylistAdviserMemo(playbacksSinceHighlyRatedSongsPlaylist: 3, playbacksSinceFavoriteAdviseGroup: 5); // Act var newMemo = target.RegisterPlayback(AdvisedPlaylist.ForAdviseSet(disc.ToAdviseSet())); // Assert var expectedMemo = new PlaylistAdviserMemo(playbacksSinceHighlyRatedSongsPlaylist: 4, playbacksSinceFavoriteAdviseGroup: 6); newMemo.Should().BeEquivalentTo(expectedMemo); }
public void RegisterPlayback_IfPlaybackAdviseIsForAdviseSetFromFavoriteAdviseGroup_SetsPlaybacksSinceFavoriteAdviseGroupToZero() { // Arrange var disc = new DiscModel { Id = new ItemId("1") } .AddToFolder(new FolderModel()); var target = new PlaylistAdviserMemo(playbacksSinceHighlyRatedSongsPlaylist: 3, playbacksSinceFavoriteAdviseGroup: 5); // Act var newMemo = target.RegisterPlayback(AdvisedPlaylist.ForAdviseSetFromFavoriteAdviseGroup(disc.ToAdviseSet())); // Assert var expectedMemo = new PlaylistAdviserMemo(playbacksSinceHighlyRatedSongsPlaylist: 4, playbacksSinceFavoriteAdviseGroup: 0); newMemo.Should().BeEquivalentTo(expectedMemo); }