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); }
public void VoteVoterNotExisting() { Voter dummy = new Voter(98); counter.Vote(dummy, voters[1]); }
public void VoteVoteeNotExisting() { Voter dummy = new Voter(98); counter.Vote(voters[0], dummy); }