AbstractGrailsTagTests (Grails 2.3.8)
Date: 2014-04-24

Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD

## org.codehaus.groovy.grails.web.taglib
[Groovy] Class AbstractGrailsTagTests

    java.lang.Object
      junit.framework.Assert
          junit.framework.TestCase
              groovy.util.GroovyTestCase
                  org.codehaus.groovy.grails.web.taglib.AbstractGrailsTagTests

    abstract class AbstractGrailsTagTests
    extends groovy.util.GroovyTestCase

Field Summary

Fields inherited from class groovy.util.GroovyTestCase
TEST_SCRIPT_NAME_PREFIX

Property Summary
`org.springframework.context.ApplicationContext` | `appCtx`
`org.springframework.context.ApplicationContext` | `ctx`
`javax.xml.parsers.DocumentBuilder` | `domBuilder`
`boolean` | `enableProfile`
`GrailsApplication` | `ga`
`groovy.lang.GroovyClassLoader` | `gcl`
`GrailsApplication` | `grailsApplication`
`org.springframework.context.MessageSource` | `messageSource`
`GrailsPluginManager` | `mockManager`
`java.lang.Object` | `originalHandler`
`org.springframework.mock.web.MockHttpServletRequest` | `request`
`org.springframework.mock.web.MockHttpServletResponse` | `response`
`org.springframework.mock.web.MockServletContext` | `servletContext`
`GrailsWebRequest` | `webRequest`
`javax.xml.xpath.XPath` | `xpath`

Method Summary
`java.lang.String` | `applyLayout(java.lang.String layout, java.lang.String template, java.util.Map params = [:])`
`java.lang.Object` | `applyTemplate(java.lang.Object template, java.lang.Object params = [:], java.lang.Object target = null, java.lang.String filename = null)`
`java.lang.Object` | `assertCompiledSourceContains(java.lang.Object expected, java.lang.Object template, java.lang.Object params = [:])`
`void` | `assertOutputContains(java.lang.Object expected, java.lang.Object template, java.lang.Object params = [:])`
`void` | `assertOutputEquals(java.lang.Object expected, java.lang.Object template, java.lang.Object params = [:], groovy.lang.Closure transform = { it.toString()` Compares the output generated by a template with a string.
`void` | `assertOutputNotContains(java.lang.Object expected, java.lang.Object template, java.lang.Object params = [:])`
`protected java.lang.Object` | `assertTemplateOutputEquals(java.lang.Object expected, GroovyPageTemplate template, java.lang.Object params = [:], groovy.lang.Closure transform = { it.toString()`
`protected void` | `assertXPathExists(org.w3c.dom.Document doc, java.lang.String expr)` Asserts that the given XPath expression matches at least one node in the given DOM document.
`protected void` | `assertXPathNotExists(org.w3c.dom.Document doc, java.lang.String expr)` Asserts that the given XPath expression matches no nodes in the given DOM document.
`GrailsWebRequest` | `buildMockRequest(groovy.util.ConfigObject config)`
`protected MockApplicationContext` | `createMockApplicationContext()`
`protected org.springframework.mock.web.MockServletContext` | `createMockServletContext()`
`protected GroovyPageTemplate` | `createTemplate(java.lang.Object template)`
`java.lang.Object` | `getCompiledSource(java.lang.Object template, java.lang.Object params = [:])`
`protected org.springframework.core.io.Resource[]` | `getResources(java.lang.String pattern)`
`protected void` | `onDestroy()`
`protected void` | `onInit()`
`protected void` | `onInitMockBeans()`
`protected void` | `onSetUp()`
`protected org.w3c.dom.Document` | `parseText(java.lang.String xml)` Parses the given XML text and creates a DOM document from it.
`void` | `printCompiledSource(java.lang.Object template, java.lang.Object params = [:])`
`java.lang.Object` | `profile(java.lang.String name, groovy.lang.Closure callable)`
`void` | `runTest(groovy.lang.Closure callable)`
`protected void` | `setUp()`
`java.lang.String` | `sitemeshPreprocess(java.lang.String template)` Applies sitemesh preprocessing to a template
`protected void` | `tearDown()`
`java.lang.Object` | `withConfig(java.lang.String text, groovy.lang.Closure callable)`
`java.lang.Object` | `withTag(java.lang.String tagName, java.io.Writer out, java.lang.String tagNamespace = "g", groovy.lang.Closure callable)`

Methods inherited from class groovy.util.GroovyTestCase
groovy.util.GroovyTestCase#getName(), groovy.util.GroovyTestCase#getMethodName(), groovy.util.GroovyTestCase#notYetImplemented(), groovy.util.GroovyTestCase#notYetImplemented(junit.framework.TestCase), groovy.util.GroovyTestCase#assertEquals(java.lang.String, java.lang.String), groovy.util.GroovyTestCase#assertEquals(java.lang.Object, java.lang.Object), groovy.util.GroovyTestCase#assertEquals(java.lang.String, java.lang.Object, java.lang.Object), groovy.util.GroovyTestCase#run(), groovy.util.GroovyTestCase#run(junit.framework.TestResult), groovy.util.GroovyTestCase#toString(), groovy.util.GroovyTestCase#format(java.lang.String, java.lang.Object, java.lang.Object), groovy.util.GroovyTestCase#setName(java.lang.String), groovy.util.GroovyTestCase#fail(java.lang.String), groovy.util.GroovyTestCase#fail(), groovy.util.GroovyTestCase#failNotEquals(java.lang.String, java.lang.Object, java.lang.Object), groovy.util.GroovyTestCase#countTestCases(), groovy.util.GroovyTestCase#runBare(), groovy.util.GroovyTestCase#assertTrue(java.lang.String, boolean), groovy.util.GroovyTestCase#assertTrue(boolean), groovy.util.GroovyTestCase#assertFalse(java.lang.String, boolean), groovy.util.GroovyTestCase#assertFalse(boolean), groovy.util.GroovyTestCase#assertNull(java.lang.String, java.lang.Object), groovy.util.GroovyTestCase#assertNull(java.lang.Object), groovy.util.GroovyTestCase#assertSame(java.lang.String, java.lang.Object, java.lang.Object), groovy.util.GroovyTestCase#assertSame(java.lang.Object, java.lang.Object), groovy.util.GroovyTestCase#assertNotSame(java.lang.String, java.lang.Object, java.lang.Object), groovy.util.GroovyTestCase#assertNotSame(java.lang.Object, java.lang.Object), groovy.util.GroovyTestCase#failSame(java.lang.String), groovy.util.GroovyTestCase#failNotSame(java.lang.String, java.lang.Object, java.lang.Object), groovy.util.GroovyTestCase#assertNotNull(java.lang.String, java.lang.Object), groovy.util.GroovyTestCase#assertNotNull(java.lang.Object), groovy.util.GroovyTestCase#assertEquals(int, int), groovy.util.GroovyTestCase#assertEquals(boolean, boolean), groovy.util.GroovyTestCase#assertEquals(java.lang.String, double, double, double), groovy.util.GroovyTestCase#assertEquals(double, double, double), groovy.util.GroovyTestCase#assertEquals(java.lang.String, float, float, float), groovy.util.GroovyTestCase#assertEquals(float, float, float), groovy.util.GroovyTestCase#assertEquals(java.lang.String, long, long), groovy.util.GroovyTestCase#assertEquals(java.lang.String, java.lang.String, java.lang.String), groovy.util.GroovyTestCase#assertEquals(java.lang.String, char, char), groovy.util.GroovyTestCase#assertEquals(char, char), groovy.util.GroovyTestCase#assertEquals(java.lang.String, short, short), groovy.util.GroovyTestCase#assertEquals(short, short), groovy.util.GroovyTestCase#assertEquals(java.lang.String, int, int), groovy.util.GroovyTestCase#assertEquals(long, long), groovy.util.GroovyTestCase#assertEquals(java.lang.String, boolean, boolean), groovy.util.GroovyTestCase#assertEquals(java.lang.String, byte, byte), groovy.util.GroovyTestCase#assertEquals(byte, byte), groovy.util.GroovyTestCase#wait(long, int), groovy.util.GroovyTestCase#wait(long), groovy.util.GroovyTestCase#wait(), groovy.util.GroovyTestCase#equals(java.lang.Object), groovy.util.GroovyTestCase#hashCode(), groovy.util.GroovyTestCase#getClass(), groovy.util.GroovyTestCase#notify(), groovy.util.GroovyTestCase#notifyAll()

Methods inherited from class junit.framework.TestCase
junit.framework.TestCase#run(), junit.framework.TestCase#run(junit.framework.TestResult), junit.framework.TestCase#toString(), junit.framework.TestCase#getName(), junit.framework.TestCase#format(java.lang.String, java.lang.Object, java.lang.Object), junit.framework.TestCase#setName(java.lang.String), junit.framework.TestCase#fail(java.lang.String), junit.framework.TestCase#fail(), junit.framework.TestCase#failNotEquals(java.lang.String, java.lang.Object, java.lang.Object), junit.framework.TestCase#countTestCases(), junit.framework.TestCase#runBare(), junit.framework.TestCase#assertTrue(java.lang.String, boolean), junit.framework.TestCase#assertTrue(boolean), junit.framework.TestCase#assertFalse(java.lang.String, boolean), junit.framework.TestCase#assertFalse(boolean), junit.framework.TestCase#assertNull(java.lang.String, java.lang.Object), junit.framework.TestCase#assertNull(java.lang.Object), junit.framework.TestCase#assertSame(java.lang.String, java.lang.Object, java.lang.Object), junit.framework.TestCase#assertSame(java.lang.Object, java.lang.Object), junit.framework.TestCase#assertNotSame(java.lang.String, java.lang.Object, java.lang.Object), junit.framework.TestCase#assertNotSame(java.lang.Object, java.lang.Object), junit.framework.TestCase#failSame(java.lang.String), junit.framework.TestCase#failNotSame(java.lang.String, java.lang.Object, java.lang.Object), junit.framework.TestCase#assertNotNull(java.lang.String, java.lang.Object), junit.framework.TestCase#assertNotNull(java.lang.Object), junit.framework.TestCase#assertEquals(int, int), junit.framework.TestCase#assertEquals(boolean, boolean), junit.framework.TestCase#assertEquals(java.lang.String, double, double, double), junit.framework.TestCase#assertEquals(double, double, double), junit.framework.TestCase#assertEquals(java.lang.String, float, float, float), junit.framework.TestCase#assertEquals(float, float, float), junit.framework.TestCase#assertEquals(java.lang.String, long, long), junit.framework.TestCase#assertEquals(java.lang.String, java.lang.Object, java.lang.Object), junit.framework.TestCase#assertEquals(java.lang.Object, java.lang.Object), junit.framework.TestCase#assertEquals(java.lang.String, java.lang.String, java.lang.String), junit.framework.TestCase#assertEquals(java.lang.String, java.lang.String), junit.framework.TestCase#assertEquals(java.lang.String, char, char), junit.framework.TestCase#assertEquals(char, char), junit.framework.TestCase#assertEquals(java.lang.String, short, short), junit.framework.TestCase#assertEquals(short, short), junit.framework.TestCase#assertEquals(java.lang.String, int, int), junit.framework.TestCase#assertEquals(long, long), junit.framework.TestCase#assertEquals(java.lang.String, boolean, boolean), junit.framework.TestCase#assertEquals(java.lang.String, byte, byte), junit.framework.TestCase#assertEquals(byte, byte), junit.framework.TestCase#wait(long, int), junit.framework.TestCase#wait(long), junit.framework.TestCase#wait(), junit.framework.TestCase#equals(java.lang.Object), junit.framework.TestCase#hashCode(), junit.framework.TestCase#getClass(), junit.framework.TestCase#notify(), junit.framework.TestCase#notifyAll()

Property Detail

### appCtx

    org.springframework.context.ApplicationContext appCtx

### ctx

    org.springframework.context.ApplicationContext ctx

### domBuilder

    javax.xml.parsers.DocumentBuilder domBuilder

### enableProfile

    boolean enableProfile

### ga

    GrailsApplication ga

### gcl

    groovy.lang.GroovyClassLoader gcl

### grailsApplication

    GrailsApplication grailsApplication

### messageSource

    org.springframework.context.MessageSource messageSource

### mockManager

    GrailsPluginManager mockManager

### originalHandler

    java.lang.Object originalHandler

### request

    org.springframework.mock.web.MockHttpServletRequest request

### response

    org.springframework.mock.web.MockHttpServletResponse response

### servletContext

    org.springframework.mock.web.MockServletContext servletContext

### webRequest

    GrailsWebRequest webRequest

### xpath

    javax.xml.xpath.XPath xpath

Method Detail

### applyLayout

    java.lang.String applyLayout(java.lang.String layout, java.lang.String template, java.util.Map params = [:])

### applyTemplate

    java.lang.Object applyTemplate(java.lang.Object template, java.lang.Object params = [:], java.lang.Object target = null, java.lang.String filename = null)

### assertCompiledSourceContains

    java.lang.Object assertCompiledSourceContains(java.lang.Object expected, java.lang.Object template, java.lang.Object params = [:])

### assertOutputContains

    void assertOutputContains(java.lang.Object expected, java.lang.Object template, java.lang.Object params = [:])

### assertOutputEquals

    void assertOutputEquals(java.lang.Object expected, java.lang.Object template, java.lang.Object params = [:], groovy.lang.Closure transform = { it.toString()

  Compares the output generated by a template with a string.
  Parameters:
    `expected` - The string that the template output is expected to match.
    `template` - The template to run.
    `params` - A map of variables to pass to the template - by default an empty map is used.
    `transform` - A closure that is passed a StringWriter instance containing the output generated by the template. It is the result of this transformation that is actually compared with the expected string. The default transform simply converts the contents of the writer to a string.

### assertOutputNotContains

    void assertOutputNotContains(java.lang.Object expected, java.lang.Object template, java.lang.Object params = [:])

### assertTemplateOutputEquals

    protected java.lang.Object assertTemplateOutputEquals(java.lang.Object expected, GroovyPageTemplate template, java.lang.Object params = [:], groovy.lang.Closure transform = { it.toString()

### assertXPathExists

    protected final void assertXPathExists(org.w3c.dom.Document doc, java.lang.String expr)

  Asserts that the given XPath expression matches at least one node in the given DOM document.

### assertXPathNotExists

    protected final void assertXPathNotExists(org.w3c.dom.Document doc, java.lang.String expr)

  Asserts that the given XPath expression matches no nodes in the given DOM document.

### buildMockRequest

    GrailsWebRequest buildMockRequest(groovy.util.ConfigObject config)

### createMockApplicationContext

    protected MockApplicationContext createMockApplicationContext()

### createMockServletContext

    protected org.springframework.mock.web.MockServletContext createMockServletContext()

### createTemplate

    protected GroovyPageTemplate createTemplate(java.lang.Object template)

### getCompiledSource

    java.lang.Object getCompiledSource(java.lang.Object template, java.lang.Object params = [:])

### getResources

    protected org.springframework.core.io.Resource[] getResources(java.lang.String pattern)

### onDestroy

    protected void onDestroy()

### onInit

    protected void onInit()

### onInitMockBeans

    protected void onInitMockBeans()

### onSetUp

    protected void onSetUp()

### parseText

    protected final org.w3c.dom.Document parseText(java.lang.String xml)

  Parses the given XML text and creates a DOM document from it.

### printCompiledSource

    void printCompiledSource(java.lang.Object template, java.lang.Object params = [:])

### profile

    java.lang.Object profile(java.lang.String name, groovy.lang.Closure callable)

### runTest

    void runTest(groovy.lang.Closure callable)

### setUp

    protected void setUp()

### sitemeshPreprocess

    java.lang.String sitemeshPreprocess(java.lang.String template)

  Applies sitemesh preprocessing to a template

### tearDown

    protected void tearDown()

### withConfig

    java.lang.Object withConfig(java.lang.String text, groovy.lang.Closure callable)

### withTag

    java.lang.Object withTag(java.lang.String tagName, java.io.Writer out, java.lang.String tagNamespace = "g", groovy.lang.Closure callable)

Groovy Documentation