Package: groovy.mock.interceptor

## [Groovy] Class LooseExpectation

- groovy.mock.interceptor.LooseExpectation

- Expects demanded call cardinalities to match demanded ranges. The calls are allowed to be out of the recorded sequence. If a method is demanded multiple times, the ranges are filled by order of recording.

  See Also:
    StrictExpectation
  Authors:
    Dierk Koenig

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `List` | `fCalls`
    `Demand` | `fDemand`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `LooseExpectation (Demand demand)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `boolean` | `isEligible(String name, int i)`
    `` | `Closure` | `match(String name)` Match the requested method name against eligible demands.
    `` | `void` | `verify()` verify all calls are in expected range

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, toString, hashCode, getClass, notify, notifyAll, wait, wait, wait`

- - ### Property Detail

    - #### List fCalls

    - #### Demand fDemand

  - ### Constructor Detail

    - #### LooseExpectation(Demand demand)

  - ### Method Detail

    - #### boolean isEligible(String name, int i)

    - #### Closure match(String name)

      Match the requested method name against eligible demands. Fail early if no match possible. Return the demand's behavior closure on match. Also skips over names matching ignore filter, if any.

    - #### void verify()

      verify all calls are in expected range