org.melati.template.test
Class MarkupLanguageSpec

Package class diagram package MarkupLanguageSpec
java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.melati.poem.test.PoemTestCase
              extended by org.melati.template.test.TreeTestCase
                  extended by org.melati.template.test.MarkupLanguageSpec
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
HTMLMarkupLanguageSpec, WMLMarkupLanguageSpec

public abstract class MarkupLanguageSpec
extends TreeTestCase

An abstract test which is run against most permutations of configuaration.

Since:
14-May-2006
Author:
timp

Field Summary
protected static org.melati.template.AttributeMarkupLanguage aml
           
protected static org.melati.Melati m
           
protected static org.melati.MelatiConfig mc
           
protected static org.melati.template.MarkupLanguage ml
           
protected static org.melati.template.TemplateEngine templateEngine
           
 
Fields inherited from class org.melati.template.test.TreeTestCase
databaseName
 
Fields inherited from class org.melati.poem.test.PoemTestCase
maxTrans, result
 
Constructor Summary
MarkupLanguageSpec()
          Constructor.
MarkupLanguageSpec(String arg0)
          Constructor for PoemTest.
 
Method Summary
protected abstract  void melatiConfig()
           
protected  void setUp()
           
 void testEncoded()
          Test method for encoded.
 void testEntitySubstitution()
          Test entity substitution.
 void testEscapedPersistent()
          Test method for escaped(Persistent).
 void testEscapedString()
          Test method for escaped(String).
 void testEvaluationErrorInTemplet()
          Test that an evaluation error in a templet is handled.
 void testGetAttr()
          Test method for getAttr().
 void testHTMLMarkupLanguageMelatiTempletLoaderPoemLocale()
          Test method for Constructor.
 void testHTMLMarkupLanguageStringHTMLMarkupLanguage()
          Test method for Constructor
 void testInputAs()
          Test method for inputAs(Field, String).
 void testInputField()
          Test method for input(Field).
 void testInputFieldForRestrictedField()
          Test access to password field.
 void testInputFieldSelection()
          Test method for input(Field) where field to be rendered as a dropdown.
 void testNull()
          Test NPE thrown.
 void testRenderedAccessPoemException()
          Test method for rendered(Exception).
 void testRenderedField()
          Test method for rendered(Field).
 void testRenderedFieldInt()
          Test method for rendered(Field, int).
 void testRenderedFieldIntInt()
          Test method for rendered(Field, int, int).
 void testRenderedMarkupString()
           
 void testRenderedObject()
          Test method for rendered(Object).
 void testRenderedStart()
          Test method for renderedStart(Field).
 void testRenderedString()
          Test method for rendered(String).
 void testRenderedStringInt()
          Test method for rendered(String, int).
 void testRenderedTreeable()
          Test method for rendered(Treeable).
 void testSearchInput()
          Test method for searchInput(Field, String).
 void testSelectionWindowField()
          Test method for input(Field) where the renderinfo is selectionWindow.
 void testSpecialTemplateFound()
          Test that special templets are found.
 void testSyntaxErrorInTemplet()
          Test that a syntax error in a templet is handled.
 void testSyntaxErrorInWMTemplet()
          Test that a syntax error in a WM templet is handled by Velocity.
 void testTemplateFoundOnClasspath()
          Test that we can find a template on the classpath.
 void testUntemplatedObjectUsesToString()
          Test that toString is used if no template found.
 
Methods inherited from class org.melati.template.test.TreeTestCase
databaseUnchanged, getDb, getTreeDatabase
 
Methods inherited from class org.melati.poem.test.PoemTestCase
assertEquals, assertEquals, assertEquals, checkColumns, checkDbUnchanged, checkTables, checkTablesAndColumns, dropTable, dumpTable, getDatabase, getDatabaseName, getDb, getName, getOrDie, getProperties, getPropertiesFileName, getUserToRunAs, run, runTest, setDatabaseName, setName, setPropertiesFileName, setUserToRunAs, tearDown, testNothing
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, run, runBare, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface junit.framework.Test
countTestCases
 

Field Detail

mc

protected static org.melati.MelatiConfig mc

templateEngine

protected static org.melati.template.TemplateEngine templateEngine

ml

protected static org.melati.template.MarkupLanguage ml

aml

protected static org.melati.template.AttributeMarkupLanguage aml

m

protected static org.melati.Melati m
Constructor Detail

MarkupLanguageSpec

public MarkupLanguageSpec(String arg0)
Constructor for PoemTest.

Parameters:
arg0 -

MarkupLanguageSpec

public MarkupLanguageSpec()
Constructor.

Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class PoemTestCase
Throws:
Exception
See Also:
TestCase.setUp()

melatiConfig

protected abstract void melatiConfig()
                              throws org.melati.util.MelatiException
Throws:
org.melati.util.MelatiException

testRenderedAccessPoemException

public void testRenderedAccessPoemException()
                                     throws Exception
Test method for rendered(Exception).

Throws:
Exception
See Also:
rendered(AccessPoemException)

testHTMLMarkupLanguageMelatiTempletLoaderPoemLocale

public void testHTMLMarkupLanguageMelatiTempletLoaderPoemLocale()
Test method for Constructor.

See Also:
HTMLMarkupLanguage(Melati, TempletLoader, PoemLocale)

testHTMLMarkupLanguageStringHTMLMarkupLanguage

public void testHTMLMarkupLanguageStringHTMLMarkupLanguage()
Test method for Constructor

See Also:
HTMLMarkupLanguage(String, HTMLMarkupLanguage)

testGetAttr

public void testGetAttr()
Test method for getAttr().

See Also:
HTMLMarkupLanguage.getAttr()

testEscapedString

public void testEscapedString()
                       throws Exception
Test method for escaped(String).

Throws:
Exception
See Also:
HTMLLikeMarkupLanguage.escaped(String)

testEntitySubstitution

public void testEntitySubstitution()
                            throws Exception
Test entity substitution.

Throws:
Exception

testEscapedPersistent

public void testEscapedPersistent()
Test method for escaped(Persistent).

See Also:
HTMLLikeMarkupLanguage.escaped(Persistent)

testEncoded

public void testEncoded()
Test method for encoded.

See Also:
HTMLLikeMarkupLanguage.encoded(String)

testRenderedObject

public void testRenderedObject()
                        throws Exception
Test method for rendered(Object).

Throws:
Exception
See Also:
MarkupLanguage.rendered(Object)

testRenderedMarkupString

public void testRenderedMarkupString()
                              throws Exception
Throws:
Exception
See Also:
MarkupLanguage.renderedMarkup(java.lang.String)

testSyntaxErrorInTemplet

public void testSyntaxErrorInTemplet()
                              throws Exception
Test that a syntax error in a templet is handled.

Throws:
Exception

testEvaluationErrorInTemplet

public void testEvaluationErrorInTemplet()
                                  throws Exception
Test that an evaluation error in a templet is handled.

Throws:
Exception

testSyntaxErrorInWMTemplet

public void testSyntaxErrorInWMTemplet()
                                throws Exception
Test that a syntax error in a WM templet is handled by Velocity.

Throws:
Exception

testTemplateFoundOnClasspath

public void testTemplateFoundOnClasspath()
                                  throws Exception
Test that we can find a template on the classpath.

Throws:
Exception

testUntemplatedObjectUsesToString

public void testUntemplatedObjectUsesToString()
                                       throws Exception
Test that toString is used if no template found.

Throws:
Exception

testSpecialTemplateFound

public void testSpecialTemplateFound()
                              throws Exception
Test that special templets are found.

Throws:
Exception

testRenderedString

public void testRenderedString()
                        throws Exception
Test method for rendered(String).

Throws:
Exception
See Also:
org.melati.template.MarkupLanguage#rendered(String)

testNull

public void testNull()
              throws Exception
Test NPE thrown.

Throws:
Exception

testRenderedStringInt

public void testRenderedStringInt()
                           throws Exception
Test method for rendered(String, int).

Throws:
Exception
See Also:
MarkupLanguage.rendered(String, int)

testRenderedField

public void testRenderedField()
                       throws Exception
Test method for rendered(Field).

Throws:
Exception
See Also:
org.melati.template.MarkupLanguage#rendered(Field)

testRenderedFieldInt

public void testRenderedFieldInt()
                          throws Exception
Test method for rendered(Field, int).

Throws:
Exception
See Also:
MarkupLanguage.rendered(Field, int)

testRenderedFieldIntInt

public void testRenderedFieldIntInt()
                             throws Exception
Test method for rendered(Field, int, int).

Throws:
Exception
See Also:
MarkupLanguage.rendered(Field, int, int)

testRenderedStart

public void testRenderedStart()
                       throws Exception
Test method for renderedStart(Field).

Throws:
Exception
See Also:
MarkupLanguage.renderedStart(Field)

testInputField

public void testInputField()
                    throws Exception
Test method for input(Field).

Throws:
Exception
See Also:
MarkupLanguage.input(Field)

testInputFieldSelection

public void testInputFieldSelection()
                             throws Exception
Test method for input(Field) where field to be rendered as a dropdown.

Throws:
Exception
See Also:
MarkupLanguage.input(Field)

testSelectionWindowField

public void testSelectionWindowField()
                              throws Exception
Test method for input(Field) where the renderinfo is selectionWindow.

Throws:
Exception
See Also:
MarkupLanguage.input(Field)

testInputFieldForRestrictedField

public void testInputFieldForRestrictedField()
                                      throws Exception
Test access to password field.

Throws:
Exception

testInputAs

public void testInputAs()
                 throws Exception
Test method for inputAs(Field, String).

Throws:
Exception
See Also:
MarkupLanguage.inputAs(Field, String)

testSearchInput

public void testSearchInput()
                     throws Exception
Test method for searchInput(Field, String).

Throws:
Exception
See Also:
MarkupLanguage.searchInput(Field, String)

testRenderedTreeable

public void testRenderedTreeable()
                          throws Exception
Test method for rendered(Treeable).

Throws:
Exception
See Also:
MarkupLanguage.rendered(Object)


Copyright © 2000-2010 PanEris. All Rights Reserved.