Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/mockobjects/ExpectationCollection.java


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 actual);
16  
17      void addActualMany(Object[] actuals);
18  
19      void addActualMany(Enumeration actuals);
20  
21      void addActualMany(Iterator actuals);
22  
23  
24      void addExpected(Object expected);
25  
26      void addExpectedMany(Object[] expectedItems);
27  
28      void addExpectedMany(Enumeration expectedItems);
29  
30      void addExpectedMany(Iterator expectedItems);
31  }