Пример #1
0
        public void Init()
        {
            voters.Clear();
            for (int i = 0; i < 5; i++) {
                voters.Add(new Voter(i));
            }
            majorityReached = false;

            nolynch = new Voter(99);
            counter = new VoteCounter<Voter>(voters, nolynch);
            counter.MajorityReached += new EventHandler<MajorityReachedEventArgs<Voter>>(OnMajorityReached);
        }
Пример #2
0
 public void VoteVoterNotExisting()
 {
     Voter dummy = new Voter(98);
     counter.Vote(dummy, voters[1]);
 }
Пример #3
0
 public void VoteVoteeNotExisting()
 {
     Voter dummy = new Voter(98);
     counter.Vote(voters[0], dummy);
 }