示例#1
0
        public void ShouldNotBeAbleToEnterStringForVotes()
        {
            var  voting          = new Voting();
            bool areVotesEntered = false;
            var  candidate       = voting.GetFirstCandidate();

            areVotesEntered = voting.SetVotesForCandidate(candidate, "abba");
            Assert.IsTrue(!areVotesEntered);
        }
示例#2
0
        public void ShouldBeAbleToEnterVotesForAllCandidates()
        {
            var  voting           = new Voting();
            bool areVotesEntered  = false;
            var  listOfCandidates = voting.GetListOfCandidates();

            foreach (var candidate in listOfCandidates)
            {
                areVotesEntered = voting.SetVotesForCandidate(candidate, 2);
            }
            Assert.IsTrue(areVotesEntered);
        }