コード例 #1
0
        public void Voteable_CanApplyVoteToComment_Successfully()
        {
            // Arrange
            var target = new CommentBuilder().SetupValidComment().Build();
            var vote   = new VoteBuilder(target).SetupValidUpvote().ByOneUser().Build();

            // Act
            target.ApplyVote(vote);

            // Assert
            Assert.Equal(1, target.VotesSum);
            Assert.Contains(vote, target.Votes);
        }