A mixin that provides mocking capability for services.
Type | Name and description |
---|---|
T |
mockService(java.lang.Class<T> serviceClass) Mocks a service class, registering it with the application context |
T |
testFor(java.lang.Class<T> serviceClass) Mocks a service class, registering it with the application context |
Methods inherited from class | Name |
---|---|
class DomainClassUnitTestMixin |
enhanceSingleEntity, getFailOnError, getSimpleDatastore, getTransactionManager, initialMockDomainSetup, initializeMappingContext, mockDomain, mockDomains, registerDomainClassValidator, registerGrailsDomainClass, saveDomainList |
class GrailsUnitTestMixin |
defineBeans, getApplicationContext, getConfig, getGrailsApplication, getMainContext, getMessageSource, mockCodec, mockFor, mockForConstraintsTests, shouldFail, shouldFail |
class TestMixinRuntimeSupport |
getFeatures, getRuntime, setRuntime, setTestClass |
class groovy.lang.GroovyObjectSupport |
groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll() |
Mocks a service class, registering it with the application context
serviceClass
- The service classMocks a service class, registering it with the application context
serviceClass
- The service class