コード例 #1
0
        public void Can_Save_Votes_After_Checkout()
        {
            var votes = new VoteResults();

            sutVoteController.AddVote(votes, 1, "");
            sutVoteController.Checkout(votes);
            sutDB.Verify(m => m.SaveVote(It.IsAny <Vote>()));
        }
コード例 #2
0
 public void Can_Add_Person_To_Vote_List()
 {
     votes = new VoteResults();
     sutController.AddVote(votes, 1, "");
     // Assert
     Assert.AreEqual(votes.Votes.Count(), 1);
     Assert.AreEqual(votes.Votes.ToArray()[0].PersonId, 1);
 }