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

            areVotesEntered = voting.SetVotesForCandidate(candidate, "abba");
            Assert.IsTrue(!areVotesEntered);
        }
Example #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);
        }