KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jmock > expectation > ExpectationCollection


1 /* Copyright (c) 2000-2004 jMock.org
2  */

3 package org.jmock.expectation;
4
5 import java.util.Enumeration JavaDoc;
6 import java.util.Iterator JavaDoc;
7
8
9 /**
10  * An <EM>ExpectationCollection</EM> is an expectation that supports multiple values, such as lists
11  * and sets.
12  * <p/>
13  * The addition methods distinguish between adding a single value and unpacking the contents of
14  * a collection. We have to make this distinction so that it is possible to add an array, enumeration,
15  * or iterator as a single expected object, rather than adding its contents.
16  */

17 public interface ExpectationCollection extends Expectation
18 {
19
20     void addActual( Object JavaDoc actual );
21
22     void addActual( long actual );
23
24     void addActualMany( Object JavaDoc[] actuals );
25
26     void addActualMany( Enumeration JavaDoc actuals );
27
28     void addActualMany( Iterator JavaDoc actuals );
29
30
31     void addExpected( Object JavaDoc expected );
32
33     void addExpected( long expected );
34
35     void addExpectedMany( Object JavaDoc[] expectedItems );
36
37     void addExpectedMany( Enumeration JavaDoc expectedItems );
38
39     void addExpectedMany( Iterator JavaDoc expectedItems );
40 }
41
Popular Tags