grails.test
[Groovy] Class TagLibUnitTestCase
java.lang.Object
GroovyTestCase
grails.test.GrailsUnitTestCase
grails.test.MvcUnitTestCase
grails.test.TagLibUnitTestCase
class TagLibUnitTestCase
extends MvcUnitTestCase
Support class for writing unit tests for tag libraries. Its main job
is to mock the various properties and methods that Grails injects
into taglibs. By default it determines what tag library to mock
based on the name of the test, but this can be overridden by one
of the constructors.
Field Summary |
protected java.lang.Object |
tagLib
|
Constructor Summary |
TagLibUnitTestCase()
Creates a new test case for the tag library that is in the same
package as the test case and has the same prefix
in its name.
|
TagLibUnitTestCase(java.lang.Class tagLibClass)
Creates a new test case for the given tag lib class.
|
Methods inherited from class GrailsUnitTestCase
|
addConverters, enableCascadingValidation, loadCodec, mockConfig, mockController, mockDomain, mockFor, mockForConstraintsTests, mockLogging, mockTagLib, registerMetaClass, setUp, tearDown |
tagLib
protected java.lang.Object tagLib
-
TagLibUnitTestCase
TagLibUnitTestCase()
- Creates a new test case for the tag library that is in the same
package as the test case and has the same prefix
in its name. For example, if the class name of the test were
org.example.MyTagLibTests
, this constructor
would mock org.example.MyTagLib
.
TagLibUnitTestCase
TagLibUnitTestCase(java.lang.Class tagLibClass)
- Creates a new test case for the given tag lib class.
getTagLibClass
java.lang.Class getTagLibClass()
-
newInstance
protected java.lang.Object newInstance()
-
setUp
protected void setUp()
-
Groovy Documentation