JavaScript is disabled on your browser.
Overview
Package
Class
Deprecated
Index
Help
Frames
No Frames
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, "<<".
AbstractGrailsMockHttpServletResponse()
- Constructor in
AbstractGrailsMockHttpServletResponse
addError(junit.framework.Test, java.lang.Throwable)
- Method in
JUnitReports
addError(junit.framework.Test, java.lang.Throwable)
- Method in
PlainFormatter
addError(junit.framework.Test, java.lang.Throwable)
- Method in
XMLFormatter
addFailure(junit.framework.Test, junit.framework.AssertionFailedError)
- Method in
JUnitReports
addFailure(junit.framework.Test, java.lang.Throwable)
- Method in
PlainFormatter
addFailure(junit.framework.Test, java.lang.Throwable)
- Method in
XMLFormatter
addFile(java.lang.String, byte[])
- Method in
GrailsMockHttpServletRequest
Add a file for the given location and bytes
applicationContext
- Property in
GrailsTestAutowirer
applicationContext
- Property in
GrailsTestRequestEnvironmentInterceptor
applicationContext
- Property in
GrailsTestTransactionInterceptor
applicationContext
- Property in
IntegrationSpecConfigurerExtension.IntegrationSpecMethodInterceptor
asWritable()
- Method in
AbstractClosureProxy
asyncContext
- Property in
GrailsMockHttpServletRequest
autowire(java.lang.Object)
- Method in
GrailsTestAutowirer
Autowires the bean by name, processes any autowiring annotations, and set's the applicationContext if it implements ApplicationContextAware.
autowire
- Property in
GrailsTestMode
autowireIfNecessary()
- Method in
GrailsTestInterceptor
B
C
call(java.lang.Object)
- Method in
AbstractClosureProxy
This is the important one: logs entry and exit of the closure call.
clearAttributes()
- Method in
GrailsMockHttpServletRequest
ControllerNameExtractor
- Class in
org.grails.test.support
ControllerNameExtractor()
- Constructor in
ControllerNameExtractor
createAutowirer()
- Method in
GrailsTestInterceptor
createFromBuildBinding(groovy.lang.Binding)
- Method in
JUnitReportsFactory
createInterceptor(java.lang.Object, org.springframework.context.ApplicationContext, java.lang.String)
- Method in
GrailsTestMode
createReport(java.lang.String, java.lang.String)
- Method in
JUnitReportsFactory
createReports(java.lang.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(java.lang.Object)
- Method in
AbstractClosureProxy
D
DEFAULT_CONTROLLER_NAME
- Property in
GrailsTestRequestEnvironmentInterceptor
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
dispatcherType
- Property in
GrailsMockHttpServletRequest
doAfterCall(java.lang.Object)
- Method in
AbstractClosureProxy
This method is called after the target closure is invoked.
doAfterCall(java.lang.Object)
- Method in
MockClosureProxy
Empty implementation.
doBeforeCall(java.lang.Object)
- Method in
AbstractClosureProxy
This method is called before the target closure is invoked.
doBeforeCall(java.lang.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(java.lang.String, groovy.lang.Closure)
- Method in
GrailsTestRequestEnvironmentInterceptor
Calls
init()
before and
destroy()
after invoking
body
.
E
each(groovy.lang.Closure)
- Method in
GrailsMockHttpServletRequest
Iterates over the request attributes.
echoErr
- Property in
SystemOutAndErrSwapper
echoOut
- Property in
SystemOutAndErrSwapper
endTest(junit.framework.Test)
- Method in
JUnitReports
endTestSuite(org.apache.tools.ant.taskdefs.optional.junit.JUnitTest)
- Method in
JUnitReports
endTestSuite(org.apache.tools.ant.taskdefs.optional.junit.JUnitTest)
- Method in
PlainFormatter
equals(java.lang.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(java.lang.String, java.lang.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(groovy.lang.Closure)
- Method in
GrailsMockHttpServletRequest
Adds a "find()" method to the request that searches the request's attributes.
findAll(groovy.lang.Closure)
- Method in
GrailsMockHttpServletRequest
Like the
find(Closure)
method, this searches the request attributes.
formats
- Field in
JUnitReportsFactory
G
getAt(java.lang.String)
- Method in
GrailsMockHttpServletRequest
Map-like access to request attributes, e.g. request["count"].
getAt(java.lang.String)
- Method in
GrailsMockHttpSession
getControllerName()
- Method in
GrailsTestInterceptor
getDelegate()
- Method in
AbstractClosureProxy
getDirective()
- Method in
AbstractClosureProxy
getFile(java.lang.String)
- Method in
GrailsMockHttpServletRequest
{
inheritDoc:
}
getFileMap()
- Method in
GrailsMockHttpServletRequest
{
inheritDoc:
}
getFileNames()
- Method in
GrailsMockHttpServletRequest
{
inheritDoc:
}
getFiles(java.lang.String)
- Method in
GrailsMockHttpServletRequest
{
inheritDoc:
}
getForwardURI()
- Method in
GrailsMockHttpServletRequest
Implementation of the dynamic "forwardURI" property.
getInputStream()
- Method in
GrailsMockHttpServletRequest
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(java.lang.String)
- Method in
GrailsMockHttpServletRequest
getMultipartHeaders(java.lang.String)
- Method in
GrailsMockHttpServletRequest
getParameterTypes()
- Method in
AbstractClosureProxy
getPart(java.lang.String)
- Method in
GrailsMockHttpServletRequest
getParts()
- Method in
GrailsMockHttpServletRequest
getProperty(java.lang.String)
- Method in
AbstractClosureProxy
getProperty(java.lang.String)
- Method in
GrailsMockHttpServletRequest
Property access for request attributes.
getProperty(java.lang.String)
- Method in
GrailsMockHttpSession
getRedirectedUrl()
- Method in
AbstractGrailsMockHttpServletResponse
getRedirectUrl()
- Method in
AbstractGrailsMockHttpServletResponse
getResolveStrategy()
- Method in
AbstractClosureProxy
getSpringApplication()
- Method in
GrailsApplicationContextLoader
getTargetFileLocation()
- Method in
GrailsMockMultipartFile
Returns:
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 SpringBootContextLoader with a version for Grails
GrailsApplicationContextLoader()
- Constructor in
GrailsApplicationContextLoader
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(javax.servlet.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.
GrailsMockHttpSession()
- Constructor in
GrailsMockHttpSession
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(java.lang.String, java.lang.String, java.lang.String, java.io.InputStream)
- Constructor in
GrailsMockMultipartFile
GrailsTestAutowirer
- Class in
org.grails.test.support
Convenience class to autowire test classes
GrailsTestAutowirer(org.springframework.context.ApplicationContext)
- Constructor in
GrailsTestAutowirer
GrailsTestInterceptor
- Class in
org.grails.test.support
GrailsTestInterceptor(java.lang.Object, org.grails.test.support.GrailsTestMode, org.springframework.context.ApplicationContext, java.lang.String)
- Constructor in
GrailsTestInterceptor
GrailsTestMode
- Class in
org.grails.test.support
GrailsTestMode()
- Constructor in
GrailsTestMode
GrailsTestRequestEnvironmentInterceptor
- Class in
org.grails.test.support
Establishes a “mock” request environment suitable for running tests in.
GrailsTestRequestEnvironmentInterceptor(org.springframework.context.ApplicationContext)
- Constructor in
GrailsTestRequestEnvironmentInterceptor
GrailsTestTransactionInterceptor
- Class in
org.grails.test.support
Establishes a rollback only transaction for running a test in.
GrailsTestTransactionInterceptor(org.springframework.context.ApplicationContext)
- Constructor in
GrailsTestTransactionInterceptor
H
hashCode()
- Method in
AbstractClosureProxy
header(java.lang.String)
- Method in
AbstractGrailsMockHttpServletResponse
Return the primary value for the given header as a String, if any.
headers(java.lang.String)
- Method in
AbstractGrailsMockHttpServletResponse
Return all values for the given header as a List of Strings.
I
init()
- Method in
GrailsTestInterceptor
init(java.lang.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()
- Constructor in
IntegrationSpecConfigurerExtension
IntegrationSpecMethodInterceptor(org.springframework.context.ApplicationContext)
- Constructor in
IntegrationSpecConfigurerExtension.IntegrationSpecMethodInterceptor
intercept(org.spockframework.runtime.extension.IMethodInvocation)
- Method in
IntegrationSpecConfigurerExtension.IntegrationSpecMethodInterceptor
invalidToken
- Property in
GrailsMockHttpServletRequest
isAsyncStarted()
- Method in
GrailsMockHttpServletRequest
isAsyncSupported()
- Method in
GrailsMockHttpServletRequest
isCase(java.lang.Object)
- Method in
AbstractClosureProxy
isGet()
- Method in
GrailsMockHttpServletRequest
isPost()
- Method in
GrailsMockHttpServletRequest
isSwapped()
- Method in
SystemOutAndErrSwapper
isTransactional(java.lang.Object)
- 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(org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter)
- Constructor in
JUnitReports
JUnitReportsFactory
- Class in
org.grails.test.report.junit
JUnitReportsFactory(java.lang.String, java.lang.String, java.io.File, List<String>)
- Constructor in
JUnitReportsFactory
K
L
leftShift(java.lang.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.
MockClosureProxy
- Class in
grails.test
This closure proxy stores an expectation and checks it before each call to the target closure.
MockClosureProxy(Closure<?>, java.lang.String, java.lang.Object)
- Constructor in
MockClosureProxy
Constructor.
mode
- Property in
IntegrationSpecConfigurerExtension.IntegrationSpecMethodInterceptor
multipartFiles
- Property in
GrailsMockHttpServletRequest
MultiplexingOutputStream
- Class in
org.grails.test.io
MultiplexingOutputStream(java.io.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(java.lang.String, java.io.File)
- Constructor in
PlainFormatter
print(java.lang.String)
- Method in
SystemOutAndErrSwapper.TestOutputCapturingPrintStream
println(java.lang.Object)
- Method in
SystemOutAndErrSwapper.TestOutputCapturingPrintStream
putAt(java.lang.String, java.lang.Object)
- Method in
GrailsMockHttpServletRequest
Map-like setting of request attributes, e.g. request["count"] = 10.
putAt(java.lang.String, java.lang.Object)
- Method in
GrailsMockHttpSession
Q
R
reports
- Field in
JUnitReports
reportsDir
- Field in
JUnitReportsFactory
requestHeaders
- Property in
GrailsMockHttpServletRequest
requestMethod
- Property in
GrailsMockHttpServletRequest
reset()
- Method in
AbstractGrailsMockHttpServletResponse
S
sanitize(java.lang.Throwable)
- Method in
TestStacktraceSanitizer
setContentType(java.lang.String)
- Method in
GrailsMockHttpServletRequest
setDelegate(java.lang.Object)
- Method in
AbstractClosureProxy
setDirective(int)
- Method in
AbstractClosureProxy
setFormat(java.lang.String)
- Method in
AbstractGrailsMockHttpServletResponse
Sets the response format
setFormat(java.lang.String)
- Method in
GrailsMockHttpServletRequest
Sets the request format to use
setForwardedUrl(java.lang.String)
- Method in
GrailsMockHttpServletResponse
setForwardURI(java.lang.String)
- Method in
GrailsMockHttpServletRequest
Sets the "forwardURI" property for the request.
setJson(java.lang.Object)
- Method in
GrailsMockHttpServletRequest
Sets the body of the request to be a json packet
setMultipartContentType(java.lang.String, java.lang.String)
- Method in
GrailsMockHttpServletRequest
setMultipartHeaders(java.lang.String, org.springframework.http.HttpHeaders)
- Method in
GrailsMockHttpServletRequest
setOutput(java.io.OutputStream)
- Method in
JUnitReports
setOutput(java.io.OutputStream)
- Method in
PlainFormatter
setOutput(java.io.OutputStream)
- Method in
XMLFormatter
setProperty(java.lang.String, java.lang.Object)
- Method in
AbstractClosureProxy
setProperty(java.lang.String, java.lang.Object)
- Method in
GrailsMockHttpServletRequest
Property setting of request attributes.
setProperty(java.lang.String, java.lang.Object)
- Method in
GrailsMockHttpSession
setResolveStrategy(int)
- Method in
AbstractClosureProxy
setSystemError(java.lang.String)
- Method in
JUnitReports
setSystemError(java.lang.String)
- Method in
PlainFormatter
setSystemOutput(java.lang.String)
- Method in
JUnitReports
setSystemOutput(java.lang.String)
- Method in
PlainFormatter
setXml(java.lang.Object)
- Method in
GrailsMockHttpServletRequest
Sets the body of the request to be an XML packet
startAsync(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
- Method in
GrailsMockHttpServletRequest
startTest(junit.framework.Test)
- Method in
JUnitReports
startTestSuite(org.apache.tools.ant.taskdefs.optional.junit.JUnitTest)
- Method in
JUnitReports
streams
- Property in
MultiplexingOutputStream
swapIn(java.io.OutputStream, java.io.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(boolean, boolean)
- Constructor in
SystemOutAndErrSwapper
systemOutput
- Field in
PlainFormatter
T
TestOutputCapturingPrintStream(java.io.PrintStream)
- Constructor in
SystemOutAndErrSwapper.TestOutputCapturingPrintStream
TestStacktraceSanitizer
- Class in
org.grails.test.support
textOut
- Property in
SystemOutAndErrSwapper.TestOutputCapturingPrintStream
TRANSACTIONAL
- Property in
GrailsTestTransactionInterceptor
transactionManagers
- Field in
GrailsTestTransactionInterceptor
transactionStatuses
- Field in
GrailsTestTransactionInterceptor
transferTo(java.io.File)
- Method in
GrailsMockMultipartFile
typeName
- Field in
JUnitReportsFactory
U
V
visitSpecAnnotation(java.lang.annotation.Annotation, org.spockframework.runtime.model.SpecInfo)
- Method in
IntegrationSpecConfigurerExtension
W
wrap(groovy.lang.Closure)
- Method in
GrailsTestInterceptor
wrapInRequestEnvironment
- Property in
GrailsTestMode
wrapInTransaction
- Property in
GrailsTestMode
write(int)
- Method in
MultiplexingOutputStream
writeToFile(java.io.File, java.lang.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(java.io.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
_
Overview
Package
Class
Deprecated
Index
Help
Frames
No Frames
Groovy Documentation