KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mockobjects > ExpectationCollection


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

13 public interface ExpectationCollection extends Expectation {
14
15     void addActual(Object JavaDoc actual);
16
17     void addActualMany(Object JavaDoc[] actuals);
18
19     void addActualMany(Enumeration actuals);
20
21     void addActualMany(Iterator actuals);
22
23
24     void addExpected(Object JavaDoc expected);
25
26     void addExpectedMany(Object JavaDoc[] expectedItems);
27
28     void addExpectedMany(Enumeration expectedItems);
29
30     void addExpectedMany(Iterator expectedItems);
31 }
32
Popular Tags