AbstractExpectationCollection (jMock API Documentation)
Keywords: org.jmock.expectation.AbstractExpectationCollection class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jmock.expectation
Class AbstractExpectationCollection

    java.lang.Object
      org.jmock.expectation.AbstractExpectation
          org.jmock.expectation.AbstractExpectationCollection

All Implemented Interfaces:
  Verifiable, Expectation, ExpectationCollection

Direct Known Subclasses:
  ExpectationList, ExpectationSet

    public abstract class AbstractExpectationCollection

extends AbstractExpectation
implements ExpectationCollection

Field Summary

Fields inherited from class org.jmock.expectation.AbstractExpectation
`myFailureModeIsImmediate, myName`

Constructor Summary
`AbstractExpectationCollection(String name)`

Method Summary
`void` | `addActual(int actualItem)`
`void` | `addActual(long actual)`
`void` | `addActual(Object actualItem)`
`void` | `addActualMany(Enumeration items)`
`void` | `addActualMany(Iterator items)`
`void` | `addActualMany(Object[] items)`
`void` | `addExpected(int expectedItem)`
`void` | `addExpected(long expected)`
`void` | `addExpected(Object expectedItem)`
`void` | `addExpectedMany(Enumeration expectedItems)`
`void` | `addExpectedMany(Iterator expectedItems)`
`void` | `addExpectedMany(Object[] expectedItems)`
`protected abstract void` | `checkImmediateValues(Object actualItem)`
`void` | `clearActual()`
`protected void` | `clearExpectation()`
`protected abstract Collection` | `getActualCollection()`
`protected abstract Collection` | `getExpectedCollection()`
`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 org.jmock.expectation.AbstractExpectation
`assertEquals, assertEquals, hasExpectations, setFailOnVerify, setHasExpectations, shouldCheckImmediately`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.jmock.expectation.Expectation
`hasExpectations, setFailOnVerify`

Constructor Detail

### AbstractExpectationCollection

    public AbstractExpectationCollection(String name)

Method Detail

### 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`

### checkImmediateValues

    protected abstract void checkImmediateValues(Object actualItem)

### clearActual

    public void clearActual()

  Specified by:
    `clearActual` in class `AbstractExpectation`

### clearExpectation

    protected void clearExpectation()

### getActualCollection

    protected abstract Collection getActualCollection()

### getExpectedCollection

    protected abstract Collection getExpectedCollection()

### 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. Implementations of this method must be idempotent: jMock can call this method more than once when verifying expectations at the end of a test.

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

### addActual

    public void addActual(long actual)

  Specified by:
    `addActual` in interface `ExpectationCollection`

### addExpected

    public void addExpected(long expected)

  Specified by:
    `addExpected` in interface `ExpectationCollection`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD