A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _

A

AbstractClosureProxy - Class in grails.test
Skeleton implementation of a wrapper class for closures that allows you to intercept invocations of the closure.
AbstractClosureProxy(Closure<?>) - Constructor in AbstractClosureProxy
Creates a new instance that wraps the target closure and sends profiling events to the given profiler log.
AbstractGrailsMockHttpServletResponse - Class in org.grails.plugins.testing
Simple sub-class of Spring's MockHttpServletResponse that adds the left-shift operator, "<<".
addError(Test, Throwable) - Method in JUnitReports
addError(Test, Throwable) - Method in PlainFormatter
addError(Test, Throwable) - Method in XMLFormatter
addFailure(Test, AssertionFailedError) - Method in JUnitReports
addFailure(Test, Throwable) - Method in PlainFormatter
addFailure(Test, Throwable) - Method in XMLFormatter
addFile(String, byte[]) - Method in GrailsMockHttpServletRequest
Add a file for the given location and bytes
addListener(AsyncListener, ServletRequest, ServletResponse) - Method in MockAsyncContext
asWritable() - Method in AbstractClosureProxy
autowire(def) - Method in GrailsTestAutowirer
Autowires the bean by name, processes any autowiring annotations, and set's the applicationContext if it implements ApplicationContextAware.
autowireIfNecessary() - Method in GrailsTestInterceptor

B

C

call(Object) - Method in AbstractClosureProxy
This is the important one: logs entry and exit of the closure call.
clearAttributes() - Method in GrailsMockHttpServletRequest
complete() - Method in MockAsyncContext
ControllerNameExtractor - Class in org.grails.test.support
createAutowirer() - Method in GrailsTestInterceptor
createFromBuildBinding(Binding) - Method in JUnitReportsFactory
createInterceptor(Object, ApplicationContext, String) - Method in GrailsTestMode
createListener(Class<T>) - Method in MockAsyncContext
createReport(String, String) - Method in JUnitReportsFactory
createReports(String) - Method in JUnitReportsFactory
createRequestEnvironmentInterceptor() - Method in GrailsTestInterceptor
createTransactionInterceptor() - Method in GrailsTestInterceptor
createWrapper(Closure<?>) - Method in AbstractClosureProxy
Called when a new instance of the proxy needs to be created for the given closure.
createWrapper(Closure<?>) - Method in MockClosureProxy
Creates a new MockClosureProxy wrapping the given closure.
curry(Object) - Method in AbstractClosureProxy

D

delete() - Method in MockPart
destroy() - Method in GrailsTestInterceptor
destroy() - Method in GrailsTestRequestEnvironmentInterceptor
Removes the mock request environment
destroy() - Method in GrailsTestTransactionInterceptor
Rolls back the current transaction.
destroyRequestEnvironmentIfNecessary() - Method in GrailsTestInterceptor
destroyTransactionIfNecessary() - Method in GrailsTestInterceptor
dispatch(ServletContext, String) - Method in MockAsyncContext
doAfterCall(Object) - Method in AbstractClosureProxy
This method is called after the target closure is invoked.
doAfterCall(Object) - Method in MockClosureProxy
Empty implementation.
doBeforeCall(Object) - Method in AbstractClosureProxy
This method is called before the target closure is invoked.
doBeforeCall(Object) - Method in MockClosureProxy
Checks whether the target "method" is expected or not, on the basis that this closure is mocking a method with the name methodName.
doInRequestEnvironment(String, Closure) - Method in GrailsTestRequestEnvironmentInterceptor
Calls init() before and destroy() after invoking body.

E

each(Closure) - Method in GrailsMockHttpServletRequest
Iterates over the request attributes.
endTest(Test) - Method in JUnitReports
endTestSuite(JUnitTest) - Method in JUnitReports
endTestSuite(JUnitTest) - Method in PlainFormatter
equals(Object) - Method in AbstractClosureProxy
Compares based on identities, but unlike the standard implementation this one will return true if the given object is the target closure for this wrapper as well.
extractControllerNameFromTestClassName(String, String) - Method in ControllerNameExtractor
Derive the controller name from the given class name using the list of given suffixes, typically ['Test', 'Tests', 'Spec', 'Specification'].

F

file - Field in PlainFormatter
find(Closure) - Method in GrailsMockHttpServletRequest
Adds a "find()" method to the request that searches the request's attributes.
findAll(Closure) - Method in GrailsMockHttpServletRequest
Like the find(Closure) method, this searches the request attributes.
formats - Field in JUnitReportsFactory

G

getAt(String) - Method in GrailsMockHttpServletRequest
Map-like access to request attributes, e.g. request["count"].
getAt(String) - Method in GrailsMockHttpSession
getContentType() - Method in MockPart
getControllerName() - Method in GrailsTestInterceptor
getDelegate() - Method in AbstractClosureProxy
getDirective() - Method in AbstractClosureProxy
getFile(String) - Method in GrailsMockHttpServletRequest
{@inheritDoc }
getFileMap() - Method in GrailsMockHttpServletRequest
{@inheritDoc }
getFileNames() - Method in GrailsMockHttpServletRequest
{@inheritDoc }
getFiles(String) - Method in GrailsMockHttpServletRequest
{@inheritDoc }
getForwardURI() - Method in GrailsMockHttpServletRequest
Implementation of the dynamic "forwardURI" property.
getHeader(String) - Method in MockPart
getHeaderNames() - Method in MockPart
getHeaders(String) - Method in MockPart
getInputStream() - Method in GrailsMockHttpServletRequest
getInputStream() - Method in MockPart
getJson() - Method in AbstractGrailsMockHttpServletResponse
Get the response JSON
getJSON() - Method in GrailsMockHttpServletRequest
Parses the request content as JSON using the JSON converter.
getMaximumNumberOfParameters() - Method in AbstractClosureProxy
getMultiFileMap() - Method in GrailsMockHttpServletRequest
{@inheritDoc }
getMultipartContentType(String) - Method in GrailsMockHttpServletRequest
getMultipartHeaders(String) - Method in GrailsMockHttpServletRequest
getName() - Method in MockPart
getParameterTypes() - Method in AbstractClosureProxy
getPart(String) - Method in GrailsMockHttpServletRequest
getParts() - Method in GrailsMockHttpServletRequest
getProperty(String) - Method in AbstractClosureProxy
getProperty(String) - Method in GrailsMockHttpServletRequest
Property access for request attributes.
getProperty(String) - Method in GrailsMockHttpSession
getRedirectedUrl() - Method in AbstractGrailsMockHttpServletResponse
getRedirectUrl() - Method in AbstractGrailsMockHttpServletResponse
getResolveStrategy() - Method in AbstractClosureProxy
getSize() - Method in MockPart
getSpringApplication() - Method in GrailsApplicationContextLoader
getSubmittedFileName() - Method in MockPart
getTargetFileLocation() - Method in GrailsMockMultipartFile
@return The location where the MultipartFile was transfered to
getText() - Method in AbstractGrailsMockHttpServletResponse
The response body as text
getXml() - Method in AbstractGrailsMockHttpServletResponse
Get the response XML
getXML() - Method in GrailsMockHttpServletRequest
Parses the request content as XML using XmlSlurper and returns the GPath result object.
GrailsApplicationContextLoader - Class in grails.boot.test
Extends Spring Boot's org.springframework.boot.test.context.SpringBootContextLoader with a version for Grails
GrailsMockHttpServletRequest - Class in org.grails.plugins.testing
A custom mock HTTP servlet request that provides the extra properties and methods normally injected by the "servlets" plugin.
GrailsMockHttpServletRequest(ServletContext) - Constructor in GrailsMockHttpServletRequest
GrailsMockHttpServletResponse - Class in org.grails.plugins.testing
Refer to the groovydoc of GrailsMockHttpServletResponse for further information.
GrailsMockHttpSession - Class in org.grails.plugins.testing
Simple sub-class of Spring's MockHttpSession that adds support for map and property notation, i.e.
GrailsMockMultipartFile - Class in org.grails.plugins.testing
Extends the default Spring MockMultipartFile to provide an implementation of transferTo that doesn't use the file system.
GrailsMockMultipartFile(String, String, String, InputStream) - Constructor in GrailsMockMultipartFile
GrailsTestAutowirer - Class in org.grails.test.support
Convenience class to autowire test classes
GrailsTestAutowirer(ApplicationContext) - Constructor in GrailsTestAutowirer
GrailsTestInterceptor - Class in org.grails.test.support
GrailsTestInterceptor(Object, GrailsTestMode, ApplicationContext, String) - Constructor in GrailsTestInterceptor
GrailsTestMode - Class in org.grails.test.support
GrailsTestRequestEnvironmentInterceptor - Class in org.grails.test.support
Establishes a “mock” request environment suitable for running tests in.
GrailsTestRequestEnvironmentInterceptor(ApplicationContext) - Constructor in GrailsTestRequestEnvironmentInterceptor
GrailsTestTransactionInterceptor - Class in org.grails.test.support
Establishes a rollback only transaction for running a test in.
GrailsTestTransactionInterceptor(ApplicationContext) - Constructor in GrailsTestTransactionInterceptor

H

hashCode() - Method in AbstractClosureProxy
hasOriginalRequestAndResponse() - Method in MockAsyncContext
header(String) - Method in AbstractGrailsMockHttpServletResponse
Return the primary value for the given header as a String, if any.
headers(String) - Method in AbstractGrailsMockHttpServletResponse
Return all values for the given header as a List of Strings.

I

init() - Method in GrailsTestInterceptor
init(String) - Method in GrailsTestRequestEnvironmentInterceptor
Establishes a mock request environment
init() - Method in GrailsTestTransactionInterceptor
Establishes a transaction.
initRequestEnvironmentIfNecessary() - Method in GrailsTestInterceptor
initTransactionIfNecessary() - Method in GrailsTestInterceptor
IntegrationSpecConfigurerExtension - Class in org.grails.test.spock
Spock extension that can be applied to Integration tests to make them Grails aware
IntegrationSpecConfigurerExtension.IntegrationSpecMethodInterceptor - Class in org.grails.test.spock
IntegrationSpecConfigurerExtension.IntegrationSpecMethodInterceptor(ApplicationContext) - Constructor in IntegrationSpecConfigurerExtension.IntegrationSpecMethodInterceptor
intercept(IMethodInvocation) - Method in IntegrationSpecConfigurerExtension.IntegrationSpecMethodInterceptor
isAsyncStarted() - Method in GrailsMockHttpServletRequest
isAsyncSupported() - Method in GrailsMockHttpServletRequest
isCase(Object) - Method in AbstractClosureProxy
isGet() - Method in GrailsMockHttpServletRequest
isPost() - Method in GrailsMockHttpServletRequest
isSwapped() - Method in SystemOutAndErrSwapper
isTransactional(def) - Method in GrailsTestTransactionInterceptor
A test is non transactional if it defines an instance or static property name 'transactional' with a value of false.
isXhr() - Method in GrailsMockHttpServletRequest
Indicates whether this is an AJAX request or not (as far as Grails is concerned).

J

JUnitReports - Class in org.grails.test.report.junit
Simply propagates to the underlying reports.
JUnitReports(JUnitResultFormatter) - Constructor in JUnitReports
JUnitReportsFactory - Class in org.grails.test.report.junit
JUnitReportsFactory(String, String, File, List<String>) - Constructor in JUnitReportsFactory

K

L

leftShift(String) - Method in AbstractGrailsMockHttpServletResponse
Appends the given content string to the response's output stream.

M

makeAjaxRequest() - Method in GrailsMockHttpServletRequest
Makes this request an AJAX request as Grails understands it.
MockAsyncContext - Class in org.grails.plugins.testing
MockAsyncContext(HttpServletRequest, HttpServletResponse) - Constructor in MockAsyncContext
MockClosureProxy - Class in grails.test
This closure proxy stores an expectation and checks it before each call to the target closure.
MockClosureProxy(Closure<?>, String, Object) - Constructor in MockClosureProxy
Constructor.
MockPart - Class in org.grails.plugins.testing
MockPart(MultipartFile) - Constructor in MockPart
MultiplexingOutputStream - Class in org.grails.test.io
MultiplexingOutputStream(OutputStream) - Constructor in MultiplexingOutputStream

N

name - Field in PlainFormatter

O

P

phaseName - Field in JUnitReportsFactory
PLAIN - Field in JUnitReportsFactory
PlainFormatter - Class in org.grails.test.report.junit
Sanitises the stack traces generated by tests.
PlainFormatter(String, File) - Constructor in PlainFormatter
print(String) - Method in SystemOutAndErrSwapper.TestOutputCapturingPrintStream
println(Object) - Method in SystemOutAndErrSwapper.TestOutputCapturingPrintStream
putAt(String, Object) - Method in GrailsMockHttpServletRequest
Map-like setting of request attributes, e.g. request["count"] = 10.
putAt(String, Object) - Method in GrailsMockHttpSession

Q

R

reports - Field in JUnitReports
reportsDir - Field in JUnitReportsFactory
reset() - Method in AbstractGrailsMockHttpServletResponse

S

sanitize(Throwable) - Method in TestStacktraceSanitizer
setContentType(String) - Method in GrailsMockHttpServletRequest
setDelegate(Object) - Method in AbstractClosureProxy
setDirective(int) - Method in AbstractClosureProxy
setFormat(String) - Method in AbstractGrailsMockHttpServletResponse
Sets the response format
setFormat(String) - Method in GrailsMockHttpServletRequest
Sets the request format to use
setForwardedUrl(String) - Method in GrailsMockHttpServletResponse
setForwardURI(String) - Method in GrailsMockHttpServletRequest
Sets the "forwardURI" property for the request.
setJson(Object) - Method in GrailsMockHttpServletRequest
Sets the body of the request to be a json packet
setMultipartContentType(String, String) - Method in GrailsMockHttpServletRequest
setMultipartHeaders(String, HttpHeaders) - Method in GrailsMockHttpServletRequest
setOutput(OutputStream) - Method in JUnitReports
setOutput(OutputStream) - Method in PlainFormatter
setOutput(OutputStream) - Method in XMLFormatter
setProperty(String, Object) - Method in AbstractClosureProxy
setProperty(String, def) - Method in GrailsMockHttpServletRequest
Property setting of request attributes.
setProperty(String, Object) - Method in GrailsMockHttpSession
setResolveStrategy(int) - Method in AbstractClosureProxy
setSystemError(String) - Method in JUnitReports
setSystemError(String) - Method in PlainFormatter
setSystemOutput(String) - Method in JUnitReports
setSystemOutput(String) - Method in PlainFormatter
setXml(Object) - Method in GrailsMockHttpServletRequest
Sets the body of the request to be an XML packet
start(Runnable) - Method in MockAsyncContext
startAsync(ServletRequest, ServletResponse) - Method in GrailsMockHttpServletRequest
startTest(Test) - Method in JUnitReports
startTestSuite(JUnitTest) - Method in JUnitReports
swapIn(OutputStream, OutputStream) - Method in SystemOutAndErrSwapper
Replaces System.out and System.err with PrintStream's wrapping outStream and errStream
swapOut() - Method in SystemOutAndErrSwapper
Restores System.out and System.err to what they were before swappedIn() was called.
swapped - Field in SystemOutAndErrSwapper
swappedInErr - Field in SystemOutAndErrSwapper
swappedInErrStream - Field in SystemOutAndErrSwapper
swappedInOut - Field in SystemOutAndErrSwapper
swappedInOutStream - Field in SystemOutAndErrSwapper
swappedOutErr - Field in SystemOutAndErrSwapper
swappedOutOut - Field in SystemOutAndErrSwapper
systemError - Field in PlainFormatter
SystemOutAndErrSwapper - Class in org.grails.test.io
Convenience class to temporarily swap in an output stream for standard error and standard out.
SystemOutAndErrSwapper.TestOutputCapturingPrintStream - Class in org.grails.test.io
SystemOutAndErrSwapper.TestOutputCapturingPrintStream(PrintStream) - Constructor in SystemOutAndErrSwapper.TestOutputCapturingPrintStream
SystemOutAndErrSwapper(boolean, boolean) - Constructor in SystemOutAndErrSwapper
systemOutput - Field in PlainFormatter

T

TestStacktraceSanitizer - Class in org.grails.test.support
transactionManagers - Field in GrailsTestTransactionInterceptor
transactionStatuses - Field in GrailsTestTransactionInterceptor
transferTo(File) - Method in GrailsMockMultipartFile
typeName - Field in JUnitReportsFactory

U

V

visitSpecAnnotation(Annotation, SpecInfo) - Method in IntegrationSpecConfigurerExtension

W

wrap(Closure) - Method in GrailsTestInterceptor
write(String) - Method in MockPart
write(int) - Method in MultiplexingOutputStream
writeToFile(File, String) - Method in PlainFormatter

X

XML - Field in JUnitReportsFactory
XMLFormatter - Class in org.grails.test.report.junit
Sanitises the stack traces generated by tests.
XMLFormatter(File) - Constructor in XMLFormatter

Y

Z

_

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _