Package com.mockobjects

# Class AbstractExpectationCollection

java.lang.Object
com.mockobjects.AbstractExpectation
com.mockobjects.AbstractExpectationCollection

All Implemented Interfaces:
  `Expectation`, `ExpectationCollection`, `Verifiable`

Direct Known Subclasses:
  `ExpectationList`, `ExpectationSet`

public abstract class AbstractExpectationCollection extends AbstractExpectation implements ExpectationCollection

## Constructor Summary

Constructors
Constructor
Description
`AbstractExpectationCollection(String name)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addActual(int actualItem)`
`void`
`addActual(Object actualItem)`
`void`
`addActualMany(Object[] items)`
`void`
`addActualMany(Enumeration items)`
`void`
`addActualMany(Iterator items)`
`void`
`addExpected(int expectedItem)`
`void`
`addExpected(Object expectedItem)`
`void`
`addExpectedMany(Object[] expectedItems)`
`void`
`addExpectedMany(Enumeration expectedItems)`
`void`
`addExpectedMany(Iterator expectedItems)`
`void`
`clearActual()`
`void`
`setExpectNothing()`
Tell the object to expect nothing to happen to it, perhaps because the test is exercising the handling of an error.
`void`
`verify()`
Throw an AssertionFailedException if any expectations have not been met.

### Methods inherited from class com.mockobjects.AbstractExpectation

`hasExpectations, setFailOnVerify`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface com.mockobjects.Expectation

`hasExpectations, setFailOnVerify`

## Constructor Details

### AbstractExpectationCollection

public AbstractExpectationCollection(String name)

## Method Details

### addActual

public void addActual(Object actualItem)

Specified by:
  `addActual` in interface `ExpectationCollection`

### addActual

public void addActual(int actualItem)

### addActualMany

public void addActualMany(Object[] items)

Specified by:
  `addActualMany` in interface `ExpectationCollection`

### addActualMany

public void addActualMany(Enumeration items)

Specified by:
  `addActualMany` in interface `ExpectationCollection`

### addActualMany

public void addActualMany(Iterator items)

Specified by:
  `addActualMany` in interface `ExpectationCollection`

### addExpected

public void addExpected(int expectedItem)

### addExpected

public void addExpected(Object expectedItem)

Specified by:
  `addExpected` in interface `ExpectationCollection`

### addExpectedMany

public void addExpectedMany(Object[] expectedItems)

Specified by:
  `addExpectedMany` in interface `ExpectationCollection`

### addExpectedMany

public void addExpectedMany(Enumeration expectedItems)

Specified by:
  `addExpectedMany` in interface `ExpectationCollection`

### addExpectedMany

public void addExpectedMany(Iterator expectedItems)

Specified by:
  `addExpectedMany` in interface `ExpectationCollection`

### clearActual

public void clearActual()

Specified by:
  `clearActual` in class `AbstractExpectation`

### setExpectNothing

public void setExpectNothing()
Description copied from interface: `Expectation`
Tell the object to expect nothing to happen to it, perhaps because the test is exercising the handling of an error. The Expectation will fail if any actual values are set. Note that this is not the same as not setting any expectations, in which case verify() will do nothing.

Specified by:
  `setExpectNothing` in interface `Expectation`

### verify

public void verify()
Description copied from interface: `Verifiable`
Throw an AssertionFailedException if any expectations have not been met.

Specified by:
  `verify` in interface `Verifiable`
Specified by:
  `verify` in class `AbstractExpectation`