Skip navigation links
A B C D E F G H I J L M N O P R S T U V W _ 

A

adjust(TemporalAdjuster) - Method in class spock.util.time.MutableClock
Applies the given TemporalAdjuster to the internal time.
annotations - Variable in class spock.config.IncludeExcludeCriteria
 
asciiDocSample(String, String) - Static method in class spock.lang.Snapshotter.PrefixSuffixWrapper
 
assertThat(String) - Method in class spock.lang.Snapshotter
Specifies the actual value.
AsyncConditions - Class in spock.util.concurrent
Alternative to class BlockingVariable(s) that allows to evaluate conditions in a thread other than the spec runner's thread(s).
AsyncConditions() - Constructor for class spock.util.concurrent.AsyncConditions
Same as AsyncConditions(1).
AsyncConditions(int) - Constructor for class spock.util.concurrent.AsyncConditions
Instantiates an AsyncConditions instance with the specified number of evaluate blocks.
AutoAttach - Annotation Type in spock.mock
Automatically attaches detached mocks DetachedMockFactory to a Specification.
AutoAttachExtension - Class in spock.mock
 
AutoAttachExtension() - Constructor for class spock.mock.AutoAttachExtension
 
AutoCleanup - Annotation Type in spock.lang
Automatically cleans up the object stored in the annotated field or property at the end of its life time.
await() - Method in class spock.util.concurrent.AsyncConditions
Same as await(1).
await(double) - Method in class spock.util.concurrent.AsyncConditions
Waits until all evaluate blocks have completed or the specified timeout (in seconds) expires.
await(int, TimeUnit) - Method in class spock.util.concurrent.AsyncConditions
Deprecated.

B

baseClasses - Variable in class spock.config.IncludeExcludeCriteria
 
BlockingVariable<T> - Class in spock.util.concurrent
A statically typed variable whose get() method will block until some other thread has set a value with the set() method, or a timeout expires.
BlockingVariable() - Constructor for class spock.util.concurrent.BlockingVariable
Same as BlockingVariable(1).
BlockingVariable(double) - Constructor for class spock.util.concurrent.BlockingVariable
Instantiates a BlockingVariable with the specified timeout in seconds.
BlockingVariable(int, TimeUnit) - Constructor for class spock.util.concurrent.BlockingVariable
Deprecated.
byteBuddy - Static variable in class spock.mock.MockMakers
Uses Byte Buddy to create mocks.

C

call(Closure<?>) - Method in class spock.util.concurrent.PollingConditions
call(double, Closure<?>) - Method in class spock.util.concurrent.PollingConditions
cglib - Static variable in class spock.mock.MockMakers
Uses CGLIB to create mocks.
compareTo(MockMakerId) - Method in class spock.mock.MockMakerId
 
ConfigurationException - Exception in spock.config
Thrown to indicate that there is a problem with Spock's configuration (file).
ConfigurationException(String, Object...) - Constructor for exception spock.config.ConfigurationException
 
ConfigurationException(String, Throwable, Object...) - Constructor for exception spock.config.ConfigurationException
 
ConfigurationObject - Annotation Type in spock.config
 
ConfineMetaClassChanges - Annotation Type in spock.util.mop
Confines any changes made to the meta classes of the specified classes to the annotated scope.
ConfineMetaClassChanges.Container - Annotation Type in spock.util.mop
 
copyFromClasspath(String) - Method in interface spock.util.io.DirectoryFixture
Copies a file from classpath using the contextClass to load the resource.
copyFromClasspath(String, String) - Method in interface spock.util.io.DirectoryFixture
Copies a file from classpath using the contextClass to load the resource.
copyFromClasspath(String, Class<?>) - Method in interface spock.util.io.DirectoryFixture
Copies a file from classpath using the contextClass to load the resource.
copyFromClasspath(String, String, Class<?>) - Method in interface spock.util.io.DirectoryFixture
Copies a file from classpath using the contextClass to load the resource.
copyFromClasspath(String) - Method in class spock.util.io.FileSystemFixture
 
copyFromClasspath(String, String) - Method in class spock.util.io.FileSystemFixture
 
copyFromClasspath(String, Class<?>) - Method in class spock.util.io.FileSystemFixture
 
copyFromClasspath(String, String, Class<?>) - Method in class spock.util.io.FileSystemFixture
 
create(Closure<?>) - Method in class spock.util.io.FileSystemFixture
Basically the same as DirectoryFixture.dir(String, Closure), but with the current root as base.
createMock(String, Class<T>, MockNature, Map<String, Object>) - Method in class spock.mock.DetachedMockFactory
 
createMock(String, T, MockNature, Map<String, Object>) - Method in class spock.mock.DetachedMockFactory
 
custom(int, int, int, int, int) - Method in class spock.config.ParallelConfiguration
Allows fine grained custom control over the parameters of the execution.

D

defaultExecutionMode - Variable in class spock.config.ParallelConfiguration
 
defaultSpecificationExecutionMode - Variable in class spock.config.ParallelConfiguration
 
deleteActual(String) - Method in class spock.lang.Snapshotter
 
deleteActual(String) - Method in class spock.lang.Snapshotter.Store
 
DetachedMockFactory - Class in spock.mock
This factory allows the creations of mocks outside of a Specification, e.g., in a Spring configuration.
DetachedMockFactory() - Constructor for class spock.mock.DetachedMockFactory
 
dir(String) - Method in interface spock.util.io.DirectoryFixture
Creates a directory, creates the ancestors as necessary.
dir(String, Closure<?>) - Method in interface spock.util.io.DirectoryFixture
Creates a directory, creates the ancestors as necessary.
dir(String) - Method in class spock.util.io.FileSystemFixture
 
dir(String, Closure<?>) - Method in class spock.util.io.FileSystemFixture
 
DirectoryFixture - Interface in spock.util.io
 
dynamic(BigDecimal) - Method in class spock.config.ParallelConfiguration
Computes the desired parallelism based on the number of available processors/cores multiplied by the factor.
dynamicWithReservedProcessors(BigDecimal, int) - Method in class spock.config.ParallelConfiguration
Computes the desired parallelism based on the number of available processors multiplied by the factor however it makes sure to keep reservedProcessors free.

E

enabled - Variable in class spock.config.ParallelConfiguration
 
equals(Object) - Method in class spock.mock.MockMakerId
 
evaluate(Runnable) - Method in class spock.util.concurrent.AsyncConditions
Evaluates the specified block, which is expected to contain one or more explicit conditions (i.e.
eventually(Closure<?>) - Method in class spock.util.concurrent.PollingConditions
Repeatedly evaluates the specified conditions until they are satisfied or the timeout has elapsed.
Exceptions - Class in spock.util
 
Exceptions() - Constructor for class spock.util.Exceptions
 
exclude - Variable in class spock.config.RunnerConfiguration
 
Execution - Annotation Type in spock.lang
Allows to set the execution mode.
expect(T, Matcher<? super T>) - Static method in class spock.util.matcher.HamcrestSupport
Alias for that(Object, org.hamcrest.Matcher) intended for use in then-blocks.

F

FailsWith - Annotation Type in spock.lang
Indicates that a feature method is expected to fail with the given exception.
file(String) - Method in interface spock.util.io.DirectoryFixture
Creates a file object relative to the enclosing fixture or directory, but not the physical File, it will eagerly create parent directories if necessary.
file(String) - Method in class spock.util.io.FileSystemFixture
 
FileSystemFixture - Class in spock.util.io
FileSystemFixture can be used to create temporary directories and files.
FileSystemFixture(Path) - Constructor for class spock.util.io.FileSystemFixture
 
filterStackTrace - Variable in class spock.config.RunnerConfiguration
 
fixed(int) - Method in class spock.config.ParallelConfiguration
Uses a fixed value for parallelism.

G

get() - Method in class spock.util.concurrent.BlockingVariable
Blocks until a value has been set for this variable, or a timeout expires.
getCauseChain(Throwable) - Static method in class spock.util.Exceptions
Returns a list of all causes of the specified exception.
getCurrent() - Static method in class spock.util.environment.Jvm
Returns the current JVM.
getCurrent() - Static method in class spock.util.environment.OperatingSystem
Returns the current operating system.
getCurrentPath() - Method in class spock.util.io.FileSystemFixture
 
getDelay() - Method in class spock.util.concurrent.PollingConditions
Returns the delay (in seconds) between successive evaluations of the conditions.
getFactor() - Method in class spock.util.concurrent.PollingConditions
Returns the factor by which the delay grows (or shrinks) after each evaluation of the conditions.
getFamily() - Method in class spock.util.environment.OperatingSystem
Returns the family of the operating system.
getInitialDelay() - Method in class spock.util.concurrent.PollingConditions
Returns the initial delay (in seconds) before first evaluating the conditions.
getJavaSpecificationVersion() - Method in class spock.util.environment.Jvm
The Java specification version, as returned by the java.specification.version system property.
getJavaVersion() - Method in class spock.util.environment.Jvm
The Java version, as returned by the java.version system property.
getMockMakerId() - Method in interface spock.mock.IMockMakerSettings
 
getName() - Method in class spock.util.environment.OperatingSystem
Returns the name of the operating system, as returned by the os.name system property.
getParallelExecutionConfiguration() - Method in class spock.config.ParallelConfiguration
Internal use only
getRootCause(Throwable) - Static method in class spock.util.Exceptions
Returns the innermost cause of the specified exception.
getSnapshotStore() - Method in class spock.lang.Snapshotter
 
getTimeout() - Method in class spock.util.concurrent.BlockingVariable
Returns the timeout (in seconds).
getTimeout() - Method in class spock.util.concurrent.PollingConditions
Returns the timeout (in seconds) until which the conditions have to be satisfied.
getVersion() - Method in class spock.util.environment.OperatingSystem
Returns the version of the operating system, as returned by the os.version system property.
getZone() - Method in class spock.util.time.MutableClock
 
GroovyMock() - Method in class spock.mock.MockingApi
Creates a Groovy mock whose type and name are inferred from the left-hand side of the enclosing variable assignment.
GroovyMock(Map<String, Object>) - Method in class spock.mock.MockingApi
Creates a Groovy mock with the specified options whose type and name are inferred from the left-hand side of the enclosing variable assignment.
GroovyMock(Class<T>) - Method in class spock.mock.MockingApi
Creates a Groovy mock with the specified type.
GroovyMock(Map<String, Object>, Class<T>) - Method in class spock.mock.MockingApi
Creates a Groovy mock with the specified options and type.
GroovyMock(Closure) - Method in class spock.mock.MockingApi
Creates a Groovy mock with the specified interactions whose type and name are inferred from the left-hand side of the enclosing assignment.
GroovyMock(Map<String, Object>, Closure) - Method in class spock.mock.MockingApi
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.
GroovyMock(Class<T>, Closure) - Method in class spock.mock.MockingApi
Creates a Groovy mock with the specified type and interactions.
GroovyMock(Map<String, Object>, Class<T>, Closure) - Method in class spock.mock.MockingApi
Creates a Groovy mock with the specified options, type, and interactions.
GroovySpy() - Method in class spock.mock.MockingApi
Creates a Groovy spy whose type and name are inferred from the left-hand side of the enclosing variable assignment.
GroovySpy(Map<String, Object>) - Method in class spock.mock.MockingApi
Creates a Groovy spy with the specified options whose type and name are inferred from the left-hand side of the enclosing variable assignment.
GroovySpy(Class<T>) - Method in class spock.mock.MockingApi
Creates a Groovy spy with the specified type.
GroovySpy(T) - Method in class spock.mock.MockingApi
Creates a Groovy spy wrapping a provided instance.
GroovySpy(T, Closure) - Method in class spock.mock.MockingApi
Creates a Groovy spy with the specified interactions wrapping a provided instance.
GroovySpy(Map<String, Object>, Class<T>) - Method in class spock.mock.MockingApi
Creates a Groovy spy with the specified options and type.
GroovySpy(Closure) - Method in class spock.mock.MockingApi
Creates a Groovy spy with the specified interactions whose type and name are inferred from the left-hand side of the enclosing assignment.
GroovySpy(Map<String, Object>, Closure) - Method in class spock.mock.MockingApi
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.
GroovySpy(Class<T>, Closure) - Method in class spock.mock.MockingApi
Creates a Groovy spy with the specified type and interactions.
GroovySpy(Map<String, Object>, Class<T>, Closure) - Method in class spock.mock.MockingApi
Creates a Groovy spy with the specified options, type, and interactions.
GroovyStub() - Method in class spock.mock.MockingApi
Creates a Groovy stub whose type and name are inferred from the left-hand side of the enclosing variable assignment.
GroovyStub(Map<String, Object>) - Method in class spock.mock.MockingApi
Creates a Groovy stub with the specified options whose type and name are inferred from the left-hand side of the enclosing variable assignment.
GroovyStub(Class<T>) - Method in class spock.mock.MockingApi
Creates a Groovy stub with the specified type.
GroovyStub(Map<String, Object>, Class<T>) - Method in class spock.mock.MockingApi
Creates a Groovy stub with the specified options and type.
GroovyStub(Closure) - Method in class spock.mock.MockingApi
Creates a Groovy stub with the specified interactions whose type and name are inferred from the left-hand side of the enclosing assignment.
GroovyStub(Map<String, Object>, Closure) - Method in class spock.mock.MockingApi
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.
GroovyStub(Class<T>, Closure) - Method in class spock.mock.MockingApi
Creates a Groovy stub with the specified type and interactions.
GroovyStub(Map<String, Object>, Class<T>, Closure) - Method in class spock.mock.MockingApi
Creates a Groovy stub with the specified options, type, and interactions.

H

HamcrestSupport - Class in spock.util.matcher
 
HamcrestSupport() - Constructor for class spock.util.matcher.HamcrestSupport
 
hashCode() - Method in class spock.mock.MockMakerId
 

I

Ignore - Annotation Type in spock.lang
Indicates that a specification or feature method should not be run.
IgnoreIf - Annotation Type in spock.lang
Ignores the annotated spec, feature or selected iterations if the given condition holds.
IgnoreIf.Container - Annotation Type in spock.lang
 
IgnoreRest - Annotation Type in spock.lang
Indicates that all feature methods except the ones carrying this annotation should be ignored.
IMockMakerSettings - Interface in spock.mock
Settings passed to the IMockMaker and created explicitly for the requested mock maker.
include - Variable in class spock.config.RunnerConfiguration
 
IncludeExcludeCriteria - Class in spock.config
Configuration indicating which specs and methods should be included/excluded from a spec run.
IncludeExcludeCriteria(Class<?>...) - Constructor for class spock.config.IncludeExcludeCriteria
 
instant() - Method in class spock.util.time.MutableClock
 
interaction(Closure) - Method in class spock.mock.MockingApi
Encloses one or more interaction definitions in a then block.
isEmpty() - Method in class spock.config.IncludeExcludeCriteria
 
isJava10() - Method in class spock.util.environment.Jvm
Tells whether the Java version is 10.
isJava10Compatible() - Method in class spock.util.environment.Jvm
Tells whether the Java version is compatible with Java 10.
isJava11() - Method in class spock.util.environment.Jvm
Tells whether the Java version is 11.
isJava11Compatible() - Method in class spock.util.environment.Jvm
Tells whether the Java version is compatible with Java 11.
isJava12() - Method in class spock.util.environment.Jvm
Tells whether the Java version is 12.
isJava12Compatible() - Method in class spock.util.environment.Jvm
Tells whether the Java version is compatible with Java 12.
isJava13() - Method in class spock.util.environment.Jvm
Tells whether the Java version is 13.
isJava13Compatible() - Method in class spock.util.environment.Jvm
Tells whether the Java version is compatible with Java 13.
isJava14() - Method in class spock.util.environment.Jvm
Tells whether the Java version is 14.
isJava14Compatible() - Method in class spock.util.environment.Jvm
Tells whether the Java version is compatible with Java 14.
isJava15() - Method in class spock.util.environment.Jvm
Tells whether the Java version is 15.
isJava15Compatible() - Method in class spock.util.environment.Jvm
Tells whether the Java version is compatible with Java 15.
isJava16() - Method in class spock.util.environment.Jvm
Tells whether the Java version is 16.
isJava16Compatible() - Method in class spock.util.environment.Jvm
Tells whether the Java version is compatible with Java 16.
isJava17() - Method in class spock.util.environment.Jvm
Tells whether the Java version is 17.
isJava17Compatible() - Method in class spock.util.environment.Jvm
Tells whether the Java version is compatible with Java 17.
isJava18() - Method in class spock.util.environment.Jvm
Tells whether the Java version is 18.
isJava18Compatible() - Method in class spock.util.environment.Jvm
Tells whether the Java version is compatible with Java 18.
isJava19() - Method in class spock.util.environment.Jvm
Tells whether the Java version is 19.
isJava19Compatible() - Method in class spock.util.environment.Jvm
Tells whether the Java version is compatible with Java 19.
isJava20() - Method in class spock.util.environment.Jvm
Tells whether the Java version is 20.
isJava20Compatible() - Method in class spock.util.environment.Jvm
Tells whether the Java version is compatible with Java 20.
isJava21() - Method in class spock.util.environment.Jvm
Tells whether the Java version is 21.
isJava21Compatible() - Method in class spock.util.environment.Jvm
Tells whether the Java version is compatible with Java 21.
isJava22() - Method in class spock.util.environment.Jvm
Tells whether the Java version is 22.
isJava22Compatible() - Method in class spock.util.environment.Jvm
Tells whether the Java version is compatible with Java 22.
isJava23() - Method in class spock.util.environment.Jvm
Tells whether the Java version is 23.
isJava23Compatible() - Method in class spock.util.environment.Jvm
Tells whether the Java version is compatible with Java 23.
isJava8() - Method in class spock.util.environment.Jvm
Tells whether the Java version is 8.
isJava8Compatible() - Method in class spock.util.environment.Jvm
Tells whether the Java version is compatible with Java 8.
isJava9() - Method in class spock.util.environment.Jvm
Tells whether the Java version is 9.
isJava9Compatible() - Method in class spock.util.environment.Jvm
Tells whether the Java version is compatible with Java 9.
isJavaVersion(int) - Method in class spock.util.environment.Jvm
Tells whether the Java version is equal to the given major Java version.
isJavaVersionCompatible(int) - Method in class spock.util.environment.Jvm
Tells whether the Java version is compatible with the given major Java version.
isLinux() - Method in class spock.util.environment.OperatingSystem
Tells whether the operating system family is Linux.
isMacOs() - Method in class spock.util.environment.OperatingSystem
Tells whether the operating system family is Mac OS.
Isolated - Annotation Type in spock.lang
Allows the isolated execution of a Specification.
isOther() - Method in class spock.util.environment.OperatingSystem
Tells whether the operating system family is anything other than those listed above.
isSolaris() - Method in class spock.util.environment.OperatingSystem
Tells whether the operating system family is Solaris.
Issue - Annotation Type in spock.lang
Indicates that a feature method or specification relates to one or more issues in an external issue tracking system.
Issue.Container - Annotation Type in spock.lang
 
isUpdateSnapshots() - Method in class spock.lang.Snapshotter.Store
 
isWindows() - Method in class spock.util.environment.OperatingSystem
Tells whether the operating system family is Windows.
isWriteActualContents() - Method in class spock.lang.Snapshotter.Store
 

J

javaProxy - Static variable in class spock.mock.MockMakers
Uses the Java Proxy API to create mocks of interfaces.
Jvm - Class in spock.util.environment
Provides information on the current JVM, such as its Java version.

L

loadSnapshot(String) - Method in class spock.lang.Snapshotter
 
loadSnapshot(String) - Method in class spock.lang.Snapshotter.Store
 

M

matchesSnapshot() - Method in class spock.lang.Snapshotter.Snapshot
Asserts that the actual value matches the snapshot using string equality.
matchesSnapshot(String) - Method in class spock.lang.Snapshotter.Snapshot
Asserts that the actual value matches the snapshot using string equality.
matchesSnapshot(BiConsumer<String, String>) - Method in class spock.lang.Snapshotter.Snapshot
Allows to specify a custom matcher for the snapshot.
matchesSnapshot(String, BiConsumer<String, String>) - Method in class spock.lang.Snapshotter.Snapshot
Allows to specify a custom matcher for the snapshot.
minus(TemporalAmount) - Method in class spock.util.time.MutableClock
Subtracts the given TemporalAmount from the internal time.
Mock(Class<T>) - Method in class spock.mock.DetachedMockFactory
Creates a mock with the specified type.
Mock(Map<String, Object>, Class<T>) - Method in class spock.mock.DetachedMockFactory
Creates a mock with the specified options and type.
Mock(Class<T>) - Method in interface spock.mock.MockFactory
Creates a mock with the specified type.
Mock(Map<String, Object>, Class<T>) - Method in interface spock.mock.MockFactory
Creates a mock with the specified options and type.
Mock() - Method in class spock.mock.MockingApi
Creates a mock whose type and name are inferred from the left-hand side of the enclosing variable assignment.
Mock(Map<String, Object>) - Method in class spock.mock.MockingApi
Creates a mock with the specified options whose type and name are inferred from the left-hand side of the enclosing variable assignment.
Mock(Class<T>) - Method in class spock.mock.MockingApi
Creates a mock with the specified type.
Mock(Map<String, Object>, Class<T>) - Method in class spock.mock.MockingApi
Creates a mock with the specified options and type.
Mock(Closure) - Method in class spock.mock.MockingApi
Creates a mock with the specified interactions whose type and name are inferred from the left-hand side of the enclosing assignment.
Mock(Map<String, Object>, Closure) - Method in class spock.mock.MockingApi
Creates a mock with the specified options and interactions whose type and name are inferred from the left-hand side of the enclosing assignment.
Mock(Class<T>, Closure) - Method in class spock.mock.MockingApi
Creates a mock with the specified type and interactions.
Mock(Map<String, Object>, Class<T>, Closure) - Method in class spock.mock.MockingApi
Creates a mock with the specified options, type, and interactions.
MockFactory - Interface in spock.mock
Base interface for Java based mocks see MockingApi or DetachedMockFactory for more examples.
MockingApi - Class in spock.mock
Spock's mocking API primarily consists of the following factory methods: Mock() Creates a general-purpose test double that supports both stubbing and mocking. Stub() Creates a test double that supports stubbing but not mocking. Spy() Creates a test double that, by default, delegates all calls to a real object.
MockingApi() - Constructor for class spock.mock.MockingApi
 
mockito - Static variable in class spock.mock.MockMakers
Uses Mockito to create mocks, which also supports final classes, enums and final methods.
mockito(Closure<?>) - Static method in class spock.mock.MockMakers
Uses Mockito to create mocks, which also supports final classes, enums and final methods.
MockMakerId - Class in spock.mock
Represents the ID of an IMockMaker.
MockMakerId(String) - Constructor for class spock.mock.MockMakerId
 
MockMakers - Class in spock.mock
Provides constants and factory methods for known built-in IMockMaker implementations.
modify(BiFunction<Instant, ZoneId, Instant>) - Method in class spock.util.time.MutableClock
Sets the internal time based on the result of the modification.
MutableClock - Class in spock.util.time
A mutable implementation of Clock for testing purposes.
MutableClock() - Constructor for class spock.util.time.MutableClock
MutableClock(Instant) - Constructor for class spock.util.time.MutableClock
Initializes a with given instant and ZoneId.systemDefault() and 1 second MutableClock.changeAmount.
MutableClock(ZoneId) - Constructor for class spock.util.time.MutableClock
Initializes a with Instant.now() and given zone and 1 second MutableClock.changeAmount.
MutableClock(Instant, ZoneId) - Constructor for class spock.util.time.MutableClock
Initializes a with 1 second MutableClock.changeAmount and given parameters.
MutableClock(Instant, ZoneId, TemporalAmount) - Constructor for class spock.util.time.MutableClock
 
MutableClock(ZonedDateTime) - Constructor for class spock.util.time.MutableClock
Initializes a with instant and zone from ZonedDateTime and 1 second MutableClock.changeAmount.

N

Narrative - Annotation Type in spock.lang
Allows to attach a natural-language description to a spec.
next() - Method in class spock.util.time.MutableClock
Adds MutableClock.changeAmount to internal time.
noExceptionThrown() - Method in class spock.lang.Specification
Specifies that no exception should be thrown, failing with a UnallowedExceptionThrownError otherwise.
NOOP - Static variable in interface spock.lang.Snapshotter.Wrapper
 
normalizedWith(Function<String, String>) - Method in class spock.lang.Snapshotter
Declares a Function for normalizing the reference value.
notThrown(Class<? extends Throwable>) - Method in class spock.lang.Specification
Specifies that no exception of the given type should be thrown, failing with a UnallowedExceptionThrownError otherwise.

O

of(String, String) - Static method in class spock.lang.Snapshotter.PrefixSuffixWrapper
 
old(T) - Method in class spock.lang.Specification
Used in a then-block to access an expression's value at the time just before the previous where-block was entered.
onTimeout(Closure<String>) - Method in class spock.util.concurrent.PollingConditions
Sets the closure that is evaluated when a timeout is reached.
OperatingSystem - Class in spock.util.environment
Provides information on the current operating system, such as its name, version, and family.
OperatingSystem.Family - Enum in spock.util.environment
An operating system family.
optimizeRunOrder - Variable in class spock.config.RunnerConfiguration
 

P

parallel - Variable in class spock.config.RunnerConfiguration
 
ParallelConfiguration - Class in spock.config
 
ParallelConfiguration() - Constructor for class spock.config.ParallelConfiguration
 
PendingFeature - Annotation Type in spock.lang
Indicates that the feature is not fully implemented yet and should not be reported as error.
PendingFeatureIf - Annotation Type in spock.lang
Marks the annotated feature or selected iterations as PendingFeature if the given condition holds.
PendingFeatureIf.Container - Annotation Type in spock.lang
 
plus(TemporalAmount) - Method in class spock.util.time.MutableClock
Adds the given TemporalAmount to the internal time.
PollingConditions - Class in spock.util.concurrent
Repeatedly evaluates one or more conditions until they are satisfied or a timeout has elapsed.
PollingConditions() - Constructor for class spock.util.concurrent.PollingConditions
 
previous() - Method in class spock.util.time.MutableClock
Subtracts MutableClock.changeAmount from internal time.

R

RepeatUntilFailure - Annotation Type in spock.lang
Repeats a feature until it fails or the maximum number of repetitions is reached.
Requires - Annotation Type in spock.lang
Ignores the annotated spec, feature or selected iterations unless the given condition holds.
Requires.Container - Annotation Type in spock.lang
 
resolve(String) - Method in class spock.util.io.FileSystemFixture
A shorthand for getCurrentPath().resolve(path)
resolve(Path) - Method in class spock.util.io.FileSystemFixture
A shorthand for getCurrentPath().resolve(path)
ResourceLock - Annotation Type in spock.lang
Allows to control access to a shared resource.
ResourceLock.Container - Annotation Type in spock.lang
 
RestoreSystemProperties - Annotation Type in spock.util.environment
Saves system properties before the annotated feature method (including any setup and cleanup methods) gets run, and restores them afterwards.
Retry - Annotation Type in spock.lang
Retries the given feature if an exception occurs during execution.
Retry.Mode - Enum in spock.lang
 
Rollup - Annotation Type in spock.lang
Indicates that iterations of a data-driven feature should not be made visible as separate features to the outside world (IDEs, reports, etc.) but as one atomic test.
RunnerConfiguration - Class in spock.config
Configuration settings for the spec runner.
RunnerConfiguration() - Constructor for class spock.config.RunnerConfiguration
 
runWithThreadAwareMocks(Runnable) - Method in class spock.mock.MockingApi
Runs the code with the thread-aware mocks activated on the current Thread.

S

saveActual(String, String) - Method in class spock.lang.Snapshotter
 
saveActual(String, String) - Method in class spock.lang.Snapshotter.Store
 
saveSnapshot(String, String) - Method in class spock.lang.Snapshotter
 
saveSnapshot(String, String) - Method in class spock.lang.Snapshotter.Store
 
See - Annotation Type in spock.lang
One or more references to external information related to a specification or feature.
See.Container - Annotation Type in spock.lang
 
set(T) - Method in class spock.util.concurrent.BlockingVariable
Sets a value for this variable.
setChangeAmount(TemporalAmount) - Method in class spock.util.time.MutableClock
 
setDelay(double) - Method in class spock.util.concurrent.PollingConditions
Sets the delay (in seconds) between successive evaluations of the conditions.
setFactor(double) - Method in class spock.util.concurrent.PollingConditions
Sets the factor by which the delay grows (or shrinks) after each evaluation of the conditions.
setInitialDelay(double) - Method in class spock.util.concurrent.PollingConditions
Sets the initial delay (in seconds) before first evaluating the conditions.
setInstant(Instant) - Method in class spock.util.time.MutableClock
 
setTimeout(double) - Method in class spock.util.concurrent.PollingConditions
Sets the timeout (in seconds) until which the conditions have to be satisfied.
settingsFor(MockMakerId) - Static method in interface spock.mock.IMockMakerSettings
Creates a default IMockMakerSettings object with only an MockMakerId.
Shared - Annotation Type in spock.lang
Indicates that a field is shared among all feature methods in a specification.
Snapshot - Annotation Type in spock.lang
Injects a Snapshotter instance into a field or parameter.
Snapshotter - Class in spock.lang
Allows to perform snapshot testing.
Snapshotter(Snapshotter.Store) - Constructor for class spock.lang.Snapshotter
 
Snapshotter.PrefixSuffixWrapper - Class in spock.lang
 
Snapshotter.Snapshot - Class in spock.lang
 
Snapshotter.Store - Class in spock.lang
 
Snapshotter.Wrapper - Interface in spock.lang
 
Specification - Class in spock.lang
Base class for Spock specifications.
Specification() - Constructor for class spock.lang.Specification
 
spock.config - package spock.config
Classes modeling Spock's configuration options.
spock.lang - package spock.lang
The core specification language.
spock.mock - package spock.mock
 
spock.util - package spock.util
 
spock.util.concurrent - package spock.util.concurrent
Utilities for testing concurrent code.
spock.util.environment - package spock.util.environment
Utilities for dealing with the test environment.
spock.util.io - package spock.util.io
 
spock.util.matcher - package spock.util.matcher
Utilities for using (Hamcrest) matchers.
spock.util.mop - package spock.util.mop
Utilities related to Groovy meta programming.
spock.util.time - package spock.util.time
 
Spy(Class<T>) - Method in class spock.mock.DetachedMockFactory
Creates a spy with the specified type.
Spy(T) - Method in class spock.mock.DetachedMockFactory
 
Spy(Map<String, Object>, Class<T>) - Method in class spock.mock.DetachedMockFactory
Creates a spy with the specified options and type.
Spy(Class<T>) - Method in interface spock.mock.MockFactory
Creates a spy with the specified type.
Spy(T) - Method in interface spock.mock.MockFactory
Creates a spy wrapping a provided instance.
Spy(Map<String, Object>, Class<T>) - Method in interface spock.mock.MockFactory
Creates a spy with the specified options and type.
Spy() - Method in class spock.mock.MockingApi
Creates a spy whose type and name are inferred from the left-hand side of the enclosing variable assignment.
Spy(Map<String, Object>) - Method in class spock.mock.MockingApi
Creates a spy with the specified options whose type and name are inferred from the left-hand side of the enclosing variable assignment.
Spy(Class<T>) - Method in class spock.mock.MockingApi
Creates a spy with the specified type.
Spy(T) - Method in class spock.mock.MockingApi
Creates a spy wrapping a provided instance.
Spy(T, Closure) - Method in class spock.mock.MockingApi
Creates a spy with the specified interactions wrapping a provided instance.
Spy(Map<String, Object>, Class<T>) - Method in class spock.mock.MockingApi
Creates a spy with the specified options and type.
Spy(Closure) - Method in class spock.mock.MockingApi
Creates a spy with the specified interactions whose type and name are inferred from the left-hand side of the enclosing assignment.
Spy(Map<String, Object>, Closure) - Method in class spock.mock.MockingApi
Creates a spy with the specified options and interactions whose type and name are inferred from the left-hand side of the enclosing assignment.
Spy(Class<T>, Closure) - Method in class spock.mock.MockingApi
Creates a spy with the specified type and interactions.
Spy(Map<String, Object>, Class<T>, Closure) - Method in class spock.mock.MockingApi
Creates a spy with the specified options, type, and interactions.
SpyStatic(Class<T>) - Method in class spock.mock.MockingApi
Creates a thread-local spy for all static methods of the passed type.
SpyStatic(Class<T>, IMockMakerSettings) - Method in class spock.mock.MockingApi
Creates a thread-local spy for all static methods of the passed type.
Stepwise - Annotation Type in spock.lang
When applied to a spec, the annotation indicates that the spec's feature methods should be run sequentially in their declared order (even in the presence of a parallel spec runner), always starting from the first method.
Store(IterationInfo, Path, boolean, boolean, String, Charset) - Constructor for class spock.lang.Snapshotter.Store
 
Stub(Class<T>) - Method in class spock.mock.DetachedMockFactory
Creates a stub with the specified type.
Stub(Map<String, Object>, Class<T>) - Method in class spock.mock.DetachedMockFactory
Creates a stub with the specified options and type.
Stub(Class<T>) - Method in interface spock.mock.MockFactory
Creates a stub with the specified type.
Stub(Map<String, Object>, Class<T>) - Method in interface spock.mock.MockFactory
Creates a stub with the specified options and type.
Stub() - Method in class spock.mock.MockingApi
Creates a stub whose type and name are inferred from the left-hand side of the enclosing variable assignment.
Stub(Map<String, Object>) - Method in class spock.mock.MockingApi
Creates a stub with the specified options whose type and name are inferred from the left-hand side of the enclosing variable assignment.
Stub(Class<T>) - Method in class spock.mock.MockingApi
Creates a stub with the specified type.
Stub(Map<String, Object>, Class<T>) - Method in class spock.mock.MockingApi
Creates a stub with the specified options and type.
Stub(Closure) - Method in class spock.mock.MockingApi
Creates a stub with the specified interactions whose type and name are inferred from the left-hand side of the enclosing assignment.
Stub(Map<String, Object>, Closure) - Method in class spock.mock.MockingApi
Creates a stub with the specified options and interactions whose type and name are inferred from the left-hand side of the enclosing assignment.
Stub(Class<T>, Closure) - Method in class spock.mock.MockingApi
Creates a stub with the specified type and interactions.
Stub(Map<String, Object>, Class<T>, Closure) - Method in class spock.mock.MockingApi
Creates a stub with the specified options, type, and interactions.
Subject - Annotation Type in spock.lang
Indicates which objects/classes are the subjects of a specification.
Subject.Container - Annotation Type in spock.lang
 

T

Tag - Annotation Type in spock.lang
 
Tag.Container - Annotation Type in spock.lang
 
TEMP_DIR_CLEANUP_PROPERTY - Static variable in annotation type spock.lang.TempDir
 
TempDir - Annotation Type in spock.lang
Generate a temp directory for test, and delete it after test.
TempDir.CleanupMode - Enum in spock.lang
 
that(T, Matcher<? super T>) - Static method in class spock.util.matcher.HamcrestSupport
Used to match a value against a (Hamcrest) matcher.
thrown() - Method in class spock.lang.Specification
Specifies that the preceding when block should throw an exception.
thrown(Class<T>) - Method in class spock.lang.Specification
Specifies that the preceding when block should throw an exception of the given type.
Timeout - Annotation Type in spock.lang
Indicates that the execution of a method should time out after the given duration has elapsed.
Title - Annotation Type in spock.lang
Allows to attach a natural-language name to a spec.
toString() - Method in class spock.lang.Snapshotter.Snapshot
 
toString() - Method in class spock.lang.Snapshotter
 
toString() - Method in class spock.mock.MockMakerId
 
toString() - Method in class spock.util.time.MutableClock
 

U

Unroll - Annotation Type in spock.lang
Indicates that iterations of a data-driven feature should be made visible as separate features to the outside world (IDEs, reports, etc.).
unwrap(String) - Method in class spock.lang.Snapshotter.PrefixSuffixWrapper
 
unwrap(String) - Method in interface spock.lang.Snapshotter.Wrapper
 
Use - Annotation Type in spock.util.mop
Activates one or more Groovy categories while the annotated spec method or class executes.
Use.Container - Annotation Type in spock.util.mop
 

V

valueOf(String) - Static method in enum spock.lang.Retry.Mode
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum spock.lang.TempDir.CleanupMode
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum spock.util.environment.OperatingSystem.Family
Returns the enum constant of this type with the specified name.
values() - Static method in enum spock.lang.Retry.Mode
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum spock.lang.TempDir.CleanupMode
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum spock.util.environment.OperatingSystem.Family
Returns an array containing the constants of this enum type, in the order they are declared.
verifyAll(Closure) - Method in class spock.lang.Specification
All assertions in this block are executed and the errors recorded and reported at the end.
verifyAll(U, Closure<?>) - Method in class spock.lang.Specification
verifyAll(Object, Class<U>, Closure) - Method in class spock.lang.Specification
verifyEach(Iterable<U>, Closure<?>) - Method in class spock.lang.Specification
Performs assertions on each item, collecting up failures instead of stopping at first.
verifyEach(Iterable<U>, Function<? super U, ?>, Closure<?>) - Method in class spock.lang.Specification
Performs assertions on each item, collecting up failures instead of stopping at first.
visitFieldAnnotation(AutoAttach, FieldInfo) - Method in class spock.mock.AutoAttachExtension
 

W

with(U, Closure<?>) - Method in class spock.lang.Specification
Sets the specified object as the implicit target of the top-level conditions and/or interactions contained in the specified code block, thereby avoiding the need to repeat the same expression multiple times.
with(Object, Class<U>, Closure) - Method in class spock.lang.Specification
Same as Specification.with(Object, groovy.lang.Closure), except that it also states that the specified target has the specified type, throwing a SpockAssertionError otherwise.
withActiveThreadAwareMocks(Callable<R>) - Method in class spock.mock.MockingApi
Runs the code with the thread-aware mocks activated on the current Thread.
within(double, Closure<?>) - Method in class spock.util.concurrent.PollingConditions
Repeatedly evaluates the specified conditions until they are satisfied or the specified timeout (in seconds) has elapsed.
withZone(ZoneId) - Method in class spock.util.time.MutableClock
 
wrap(String) - Method in class spock.lang.Snapshotter.PrefixSuffixWrapper
 
wrap(String) - Method in interface spock.lang.Snapshotter.Wrapper
 
wrappedAs(Snapshotter.Wrapper) - Method in class spock.lang.Snapshotter
Declares a Snapshotter.Wrapper for wrapping and unwrapping of the reference value.

_

_ - Static variable in class spock.lang.Specification
The wildcard symbol.
A B C D E F G H I J L M N O P R S T U V W _ 
Skip navigation links