KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > mockobjects > TestExpectationList


1 package test.mockobjects;
2
3 import junit.framework.Test;
4 import junit.framework.TestSuite;
5
6 import com.mockobjects.ExpectationList;
7
8 public class TestExpectationList extends TestExpectationCollection {
9     private static final Class JavaDoc THIS = TestExpectationList.class;
10
11     public TestExpectationList(String JavaDoc name) {
12         super(name);
13         myExpectation = new ExpectationList(name);
14     }
15
16     public void lookAtTheSuperclassForTests() {
17     }
18
19     public static void main(String JavaDoc[] args) {
20         start(new String JavaDoc[] { THIS.getName()});
21     }
22
23     public static Test suite() {
24         return new TestSuite(THIS);
25     }
26
27     public void testSorted() {
28         myExpectation.addExpected("A");
29         myExpectation.addExpected("B");
30
31         myExpectation.addActual("A");
32         myExpectation.addActual("B");
33
34         myExpectation.verify();
35     }
36 }
37
Popular Tags