private static PlaylistEntry SetupVotedEntry() { var entry = new PlaylistEntry(0, Helpers.SetupSongMock()); entry.Vote(); return(entry); }
public void RegisteredVoteUnregistersAutomaticallyWhenEntryVoteCountIsReset() { var accessControl = SetupVotableAccessControl(2); Guid token = accessControl.RegisterRemoteAccessToken(new Guid()); var entry = new PlaylistEntry(0, Helpers.SetupSongMock()); entry.Vote(); var votes = accessControl.ObserveRemainingVotes(token).CreateCollection(); accessControl.RegisterVote(token, entry); entry.ResetVotes(); Assert.Equal(new int?[] { 2, 1, 2 }, votes); }
private static PlaylistEntry SetupVotedEntry() { var entry = new PlaylistEntry(0, Helpers.SetupSongMock()); entry.Vote(); return entry; }