# Class goog.testing.LooseExpectationCollection

code »

This class is an ordered collection of expectations for one method. Since the loose mock does most of its verification at the time of $verify, this class is necessary to manage the return/throw behavior when the mock is being called.

## Constructor

goog.testing.LooseExpectationCollection ( )
Show:Public Protected Private

## Instance Methods

code »addExpectation ( expectation )

Adds an expectation to this collection.

Parameters
expectation: `goog.testing.MockExpectation` The expectation to add.

code »getExpectations ( ) ⇒ `Array.<goog.testing.MockExpectation>`

Gets the list of expectations in this collection.

Returns
The array of expectations.

## Instance Properties

code »expectations_ : `Array.<goog.testing.MockExpectation>`

The list of expectations. All of these should have the same name.