Package | Description |
---|---|
org.spockframework.lang | |
org.spockframework.mock |
Spock's built-in mocking framework.
|
org.spockframework.mock.runtime | |
spock.lang |
The core specification language.
|
spock.util.concurrent |
Utilities for testing concurrent code.
|
Modifier and Type | Class | Description |
---|---|---|
interface |
ConditionBlock |
Indicates that the closure argument(s) of the annotated method are code blocks
containing conditions, allowing to leave off the assert keyword.
|
interface |
ISpecificationContext |
Modifier and Type | Method | Description |
---|---|---|
java.lang.Object |
SpecInternals.createMock(java.lang.String name,
java.lang.Class<?> type,
MockNature nature,
MockImplementation implementation,
java.util.Map<java.lang.String,java.lang.Object> options,
groovy.lang.Closure closure) |
|
ISpecificationContext |
SpecInternals.getSpecificationContext() |
Modifier and Type | Class | Description |
---|---|---|
class |
CallRealMethodResponse |
A response strategy that delegates method calls to the real object underlying the mock (if any).
|
class |
EmptyOrDummyResponse |
A response strategy that returns zero, an "empty" object, or a "dummy" object,
depending on the method's declared return type.
|
interface |
IMockConfiguration |
Configuration options for mock objects.
|
interface |
IResponseGenerator |
Generates responses to mock invocations.
|
class |
MockDetector |
Detects mock objects and provides information about them.
|
class |
MockImplementation |
Determines how method calls are processed and matched against interactions.
|
class |
MockNature |
A named set of defaults for a mock's configuration options.
|
class |
ZeroOrNullResponse |
A response strategy that returns zero, false, or null, depending on the method's return type.
|
Modifier and Type | Class | Description |
---|---|---|
class |
MockConfiguration |
Modifier and Type | Method | Description |
---|---|---|
java.lang.Object |
MockingApi.GroovyMock() |
Creates a Groovy mock whose type and name are inferred from the left-hand side of the enclosing variable assignment.
|
java.lang.Object |
MockingApi.GroovyMock(groovy.lang.Closure interactions) |
Creates a Groovy mock with the specified interactions whose type and name are inferred
from the left-hand side of the enclosing assignment.
|
<T> T |
MockingApi.GroovyMock(java.lang.Class<T> type) |
Creates a Groovy mock with the specified type.
|
<T> T |
MockingApi.GroovyMock(java.lang.Class<T> type,
groovy.lang.Closure interactions) |
Creates a Groovy mock with the specified type and interactions.
|
java.lang.Object |
MockingApi.GroovyMock(java.util.Map<java.lang.String,java.lang.Object> options) |
Creates a Groovy mock with the specified options whose type and name are inferred from the left-hand side of the
enclosing variable assignment.
|
java.lang.Object |
MockingApi.GroovyMock(java.util.Map<java.lang.String,java.lang.Object> options,
groovy.lang.Closure interactions) |
Creates a Groovy mock with the specified options and interactions whose type and name are inferred
from the left-hand side of the enclosing assignment.
|
<T> T |
MockingApi.GroovyMock(java.util.Map<java.lang.String,java.lang.Object> options,
java.lang.Class<T> type) |
Creates a Groovy mock with the specified options and type.
|
<T> T |
MockingApi.GroovyMock(java.util.Map<java.lang.String,java.lang.Object> options,
java.lang.Class<T> type,
groovy.lang.Closure interactions) |
Creates a Groovy mock with the specified options, type, and interactions.
|
java.lang.Object |
MockingApi.GroovySpy() |
Creates a Groovy spy whose type and name are inferred from the left-hand side of the enclosing variable assignment.
|
java.lang.Object |
MockingApi.GroovySpy(groovy.lang.Closure interactions) |
Creates a Groovy spy with the specified interactions whose type and name are inferred
from the left-hand side of the enclosing assignment.
|
<T> T |
MockingApi.GroovySpy(java.lang.Class<T> type) |
Creates a Groovy spy with the specified type.
|
<T> T |
MockingApi.GroovySpy(java.lang.Class<T> type,
groovy.lang.Closure interactions) |
Creates a Groovy spy with the specified type and interactions.
|
java.lang.Object |
MockingApi.GroovySpy(java.util.Map<java.lang.String,java.lang.Object> options) |
Creates a Groovy spy with the specified options whose type and name are inferred from the left-hand side of the
enclosing variable assignment.
|
java.lang.Object |
MockingApi.GroovySpy(java.util.Map<java.lang.String,java.lang.Object> options,
groovy.lang.Closure interactions) |
Creates a Groovy spy with the specified options and interactions whose type and name are inferred
from the left-hand side of the enclosing assignment.
|
<T> T |
MockingApi.GroovySpy(java.util.Map<java.lang.String,java.lang.Object> options,
java.lang.Class<T> type) |
Creates a Groovy spy with the specified options and type.
|
<T> T |
MockingApi.GroovySpy(java.util.Map<java.lang.String,java.lang.Object> options,
java.lang.Class<T> type,
groovy.lang.Closure interactions) |
Creates a Groovy spy with the specified options, type, and interactions.
|
java.lang.Object |
MockingApi.GroovyStub() |
Creates a Groovy stub whose type and name are inferred from the left-hand side of the enclosing variable assignment.
|
java.lang.Object |
MockingApi.GroovyStub(groovy.lang.Closure interactions) |
Creates a Groovy stub with the specified interactions whose type and name are inferred
from the left-hand side of the enclosing assignment.
|
<T> T |
MockingApi.GroovyStub(java.lang.Class<T> type) |
Creates a Groovy stub with the specified type.
|
<T> T |
MockingApi.GroovyStub(java.lang.Class<T> type,
groovy.lang.Closure interactions) |
Creates a Groovy stub with the specified type and interactions.
|
java.lang.Object |
MockingApi.GroovyStub(java.util.Map<java.lang.String,java.lang.Object> options) |
Creates a Groovy stub with the specified options whose type and name are inferred from the left-hand side of the
enclosing variable assignment.
|
java.lang.Object |
MockingApi.GroovyStub(java.util.Map<java.lang.String,java.lang.Object> options,
groovy.lang.Closure interactions) |
Creates a Groovy stub with the specified options and interactions whose type and name are inferred
from the left-hand side of the enclosing assignment.
|
<T> T |
MockingApi.GroovyStub(java.util.Map<java.lang.String,java.lang.Object> options,
java.lang.Class<T> type) |
Creates a Groovy stub with the specified options and type.
|
<T> T |
MockingApi.GroovyStub(java.util.Map<java.lang.String,java.lang.Object> options,
java.lang.Class<T> type,
groovy.lang.Closure interactions) |
Creates a Groovy stub with the specified options, type, and interactions.
|
java.lang.Object |
MockingApi.Mock(groovy.lang.Closure interactions) |
Creates a mock with the specified interactions whose type and name are inferred
from the left-hand side of the enclosing assignment.
|
<T> T |
MockingApi.Mock(java.lang.Class<T> type,
groovy.lang.Closure interactions) |
Creates a mock with the specified type and interactions.
|
java.lang.Object |
MockingApi.Mock(java.util.Map<java.lang.String,java.lang.Object> options) |
Creates a mock with the specified options whose type and name are inferred from the left-hand side of the
enclosing variable assignment.
|
java.lang.Object |
MockingApi.Mock(java.util.Map<java.lang.String,java.lang.Object> options,
groovy.lang.Closure interactions) |
Creates a mock with the specified options and interactions whose type and name are inferred
from the left-hand side of the enclosing assignment.
|
<T> T |
MockingApi.Mock(java.util.Map<java.lang.String,java.lang.Object> options,
java.lang.Class<T> type) |
Creates a mock with the specified options and type.
|
<T> T |
MockingApi.Mock(java.util.Map<java.lang.String,java.lang.Object> options,
java.lang.Class<T> type,
groovy.lang.Closure interactions) |
Creates a mock with the specified options, type, and interactions.
|
java.lang.Object |
MockingApi.Spy() |
Creates a spy whose type and name are inferred from the left-hand side of the enclosing variable assignment.
|
java.lang.Object |
MockingApi.Spy(groovy.lang.Closure interactions) |
Creates a spy with the specified interactions whose type and name are inferred
from the left-hand side of the enclosing assignment.
|
<T> T |
MockingApi.Spy(java.lang.Class<T> type) |
Creates a spy with the specified type.
|
<T> T |
MockingApi.Spy(java.lang.Class<T> type,
groovy.lang.Closure interactions) |
Creates a spy with the specified type and interactions.
|
java.lang.Object |
MockingApi.Spy(java.util.Map<java.lang.String,java.lang.Object> options) |
Creates a spy with the specified options whose type and name are inferred from the left-hand side of the
enclosing variable assignment.
|
java.lang.Object |
MockingApi.Spy(java.util.Map<java.lang.String,java.lang.Object> options,
groovy.lang.Closure interactions) |
Creates a spy with the specified options and interactions whose type and name are inferred
from the left-hand side of the enclosing assignment.
|
<T> T |
MockingApi.Spy(java.util.Map<java.lang.String,java.lang.Object> options,
java.lang.Class<T> type) |
Creates a spy with the specified options and type.
|
<T> T |
MockingApi.Spy(java.util.Map<java.lang.String,java.lang.Object> options,
java.lang.Class<T> type,
groovy.lang.Closure interactions) |
Creates a spy with the specified options, type, and interactions.
|
java.lang.Object |
MockingApi.Stub() |
Creates a stub whose type and name are inferred from the left-hand side of the enclosing variable assignment.
|
java.lang.Object |
MockingApi.Stub(groovy.lang.Closure interactions) |
Creates a stub with the specified interactions whose type and name are inferred
from the left-hand side of the enclosing assignment.
|
<T> T |
MockingApi.Stub(java.lang.Class<T> type) |
Creates a stub with the specified type.
|
<T> T |
MockingApi.Stub(java.lang.Class<T> type,
groovy.lang.Closure interactions) |
Creates a stub with the specified type and interactions.
|
java.lang.Object |
MockingApi.Stub(java.util.Map<java.lang.String,java.lang.Object> options) |
Creates a stub with the specified options whose type and name are inferred from the left-hand side of the
enclosing variable assignment.
|
java.lang.Object |
MockingApi.Stub(java.util.Map<java.lang.String,java.lang.Object> options,
groovy.lang.Closure interactions) |
Creates a stub with the specified options and interactions whose type and name are inferred
from the left-hand side of the enclosing assignment.
|
<T> T |
MockingApi.Stub(java.util.Map<java.lang.String,java.lang.Object> options,
java.lang.Class<T> type) |
Creates a stub with the specified options and type.
|
<T> T |
MockingApi.Stub(java.util.Map<java.lang.String,java.lang.Object> options,
java.lang.Class<T> type,
groovy.lang.Closure interactions) |
Creates a stub with the specified options, type, and interactions.
|
void |
Specification.with(java.lang.Object object,
groovy.lang.Closure closure) |
Modifier and Type | Class | Description |
---|---|---|
class |
PollingConditions |
Repeatedly evaluates one or more conditions until they are satisfied or a timeout has elapsed.
|
Copyright © 2018. All rights reserved