Groovy Documentation

grails.test.mixin.integration
[Groovy] Class IntegrationTestMixin

java.lang.Object
  grails.test.mixin.integration.IntegrationTestMixin
All Implemented Interfaces:
TestMixinTargetAware

@groovy.transform.CompileStatic
class IntegrationTestMixin
extends java.lang.Object

A mixin for enhancing integration tests with autowiring and transactional capabitities


Property Summary
GrailsTestInterceptor interceptor

java.lang.Object target

 
Method Summary
void destoryIntegrationTest()

void initIntegrationTest()

void setTarget(java.lang.Object target)

java.lang.String shouldFail(groovy.lang.Closure code)

Asserts that the given code closure fails when it is evaluated

java.lang.String shouldFail(java.lang.Class clazz, groovy.lang.Closure code)

Asserts that the given code closure fails when it is evaluated and that a particular exception is thrown.

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), 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

interceptor

GrailsTestInterceptor interceptor


target

java.lang.Object target


 
Method Detail

destoryIntegrationTest

@org.junit.After
void destoryIntegrationTest()


initIntegrationTest

@org.junit.Before
void initIntegrationTest()


setTarget

@groovy.transform.CompileStatic(TypeCheckingMode.SKIP)
void setTarget(java.lang.Object target)


shouldFail

java.lang.String shouldFail(groovy.lang.Closure code)
Asserts that the given code closure fails when it is evaluated
Parameters:
code
Returns:
the message of the thrown Throwable


shouldFail

java.lang.String shouldFail(java.lang.Class clazz, groovy.lang.Closure code)
Asserts that the given code closure fails when it is evaluated and that a particular exception is thrown.
Parameters:
clazz - the class of the expected exception
code - the closure that should fail
Returns:
the message of the expected Throwable


 

Groovy Documentation