Changeset 209 for liacs/TOOS/assignment1/src/CensusTest.java
- Timestamp:
- Oct 26, 2010, 6:19:27 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
liacs/TOOS/assignment1/src/CensusTest.java
r208 r209 1 package nl.rickvanderzwet.toos.assignment1;2 3 1 import java.util.Calendar; 4 2 import java.util.HashSet; … … 11 9 12 10 public void testEmptyVoteList() { 11 HashSet<Voter> v = null; 13 12 Census c = new Census(); 14 assertTrue(c.census( null).equals(null));13 assertTrue(c.census(v).equals(null)); 15 14 } 16 17 public void testNoVote() { 18 fail("An error message"); 15 16 public void testAllPositiveVote() { 17 HashSet<Voter> v = new HashSet<Voter>(); 18 v.add(new Voter(true)); 19 v.add(new Voter(true)); 20 v.add(new Voter(true)); 21 v.add(new Voter(true)); 22 23 Census c = new Census(); 24 assertTrue(c.census(v)); 19 25 } 20 26 27 public void testNegativeVote() { 28 HashSet<Voter> v = new HashSet<Voter>(); 29 v.add(new Voter(true)); 30 v.add(new Voter(true)); 31 v.add(new Voter(false)); 32 v.add(new Voter(true)); 33 34 Census c = new Census(); 35 assertFalse(c.census(v)); 36 } 21 37 }
Note:
See TracChangeset
for help on using the changeset viewer.