public void RegisteredShadowVoteUnregistersAutomaticallyWhenEntryVoteCountIsReset() { var accessControl = SetupVotableAccessControl(); Guid token = accessControl.RegisterRemoteAccessToken(new Guid()); PlaylistEntry entry = SetupShadowVotedEntry(); accessControl.RegisterShadowVote(token, entry); entry.ResetVotes(); Assert.False(entry.IsShadowVoted); }
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); }