Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD

## groovy.mock.interceptor
[Groovy] Class LooseExpectation

    java.lang.Object
      groovy.mock.interceptor.LooseExpectation

    class 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.

Authors:
  Dierk Koenig

See Also:
  StrictExpectation

Property Summary
`java.util.List` | `fCalls`
`Demand` | `fDemand`

Constructor Summary
`LooseExpectation(Demand demand)`

Method Summary
`boolean` | `isEligible(java.lang.String name, int i)`
`Closure` | `match(java.lang.String name)` Match the requested method name against eligible demands.
`void` | `verify()` verify all calls are in expected range

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Property Detail

### fCalls

    java.util.List fCalls

### fDemand

    Demand fDemand

Constructor Detail

### LooseExpectation

    LooseExpectation(Demand demand)

Method Detail

### isEligible

    boolean isEligible(java.lang.String name, int i)

### match

    Closure match(java.lang.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.

### verify

    void verify()

  verify all calls are in expected range

Groovy Documentation