Last change
on this file since 380 was 210, checked in by Rick van der Zwet, 14 years ago |
Some more test cases and a working program. Let's go to the University.
|
File size:
679 bytes
|
Line | |
---|
1 | import java.util.Calendar;
|
---|
2 | import java.util.HashSet;
|
---|
3 | import java.util.Enumeration;
|
---|
4 |
|
---|
5 | import nl.rickvanderzwet.toos.assignment1.Voter;
|
---|
6 |
|
---|
7 | /**
|
---|
8 | * Make sure both the variable and the function return the proper values if set.
|
---|
9 | */
|
---|
10 | public class VoterTest extends junit.framework.TestCase {
|
---|
11 |
|
---|
12 |
|
---|
13 | public void testTrueVote() {
|
---|
14 | Voter v = new Voter(true);
|
---|
15 | assertTrue(v.fvote);
|
---|
16 | assertTrue(v.getVote());
|
---|
17 | }
|
---|
18 |
|
---|
19 | public void testFalseVote() {
|
---|
20 | Voter v = new Voter(false);
|
---|
21 | assertFalse(v.fvote);
|
---|
22 | assertFalse(v.getVote());
|
---|
23 | }
|
---|
24 |
|
---|
25 | public void testEmptyVote() {
|
---|
26 | Voter v = new Voter();
|
---|
27 | assertNull(v.fvote);
|
---|
28 | assertNull(v.getVote());
|
---|
29 | }
|
---|
30 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.