public void TestRemoveCandidates2() { var p = new Person(2, 1, 0); var p1 = p.RemoveCandidates(1, 0); Assert.AreEqual(0, p1.Ranking(2), "Ranking of candidate #2"); Assert.AreEqual(1, p1.FullRanking().Count(), "# of candidates around now"); }
public void TestRemoveCandidates1RemovedCandidateReference() { var p = new Person(2, 1, 0); var p1 = p.RemoveCandidates(1); p1.Ranking(1); }
public void TestRemoveCandidates1Twice() { var p = new Person(2, 1, 0); var p1 = p.RemoveCandidates(1); var p2 = p.RemoveCandidates(1); Assert.AreEqual(2, p2.NumberOfCandidates, "# of candidates after 1 removed twice"); }
public void TestRemoveCandidates1() { var p = new Person(2, 1, 0); var p1 = p.RemoveCandidates(1); Assert.AreEqual(0, p1.Ranking(0), "Ranking of zero"); Assert.AreEqual(1, p1.Ranking(2), "Ranking of candidate #2"); Assert.AreEqual(2, p1.FullRanking().Count(), "# of candidates around now"); Assert.AreEqual(2, p1.NumberOfCandidates, "# of candidates stored"); }