org.apache.velocity.test.sql
Class DataSourceResourceLoaderTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.velocity.test.BaseTestCase
              extended by org.apache.velocity.test.sql.BaseSQLTest
                  extended by org.apache.velocity.test.sql.DataSourceResourceLoaderTestCase
All Implemented Interfaces:
junit.framework.Test, TemplateTestBase

public class DataSourceResourceLoaderTestCase
extends BaseSQLTest


Nested Class Summary
static class DataSourceResourceLoaderTestCase.DSRLTCTool
           
 
Field Summary
 
Fields inherited from class org.apache.velocity.test.BaseTestCase
context, DEBUG, log, stringRepoName
 
Fields inherited from interface org.apache.velocity.test.TemplateTestBase
FILE_RESOURCE_LOADER_PATH, RESULT_DIR, TEST_CASE_PROPERTIES, TEST_COMPARE_DIR, TEST_RESULT_DIR, TMPL_FILE_EXT
 
Constructor Summary
DataSourceResourceLoaderTestCase(String name)
           
 
Method Summary
protected  org.apache.velocity.Template executeTest(String templateName)
           
 void setUp()
           
 void setUpUnicode()
           
static junit.framework.Test suite()
           
 void testMacroInvocation()
          Does it load the global Macros from the DB?
 void testNullTimestamp()
          Will a NULL timestamp choke the loader?
 void testRenderTool()
          Now we have a more complex example.
 void testSimpleTemplate()
          Tests loading and rendering of a simple template.
 void testUnicode()
           
 
Methods inherited from class org.apache.velocity.test.sql.BaseSQLTest
executeSQL
 
Methods inherited from class org.apache.velocity.test.BaseTestCase
addTemplate, assertContextValue, assertEvalEquals, assertEvalException, assertEvalException, assertEvalExceptionAt, assertEvalExceptionAt, assertSchmoo, assertTmplEquals, assureResultsDirectoryExists, evaluate, getFileContents, getFileName, getFileName, getStringRepository, getTestCaseName, info, info, isMatch, isMatch, normalizeNewlines, removeTemplate, setUpContext, setUpEngine, tearDown, testBase
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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, 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
 

Constructor Detail

DataSourceResourceLoaderTestCase

public DataSourceResourceLoaderTestCase(String name)
                                 throws Exception
Throws:
Exception
Method Detail

suite

public static junit.framework.Test suite()

setUp

public void setUp()
           throws Exception
Overrides:
setUp in class BaseTestCase
Throws:
Exception

setUpUnicode

public void setUpUnicode()
                  throws Exception
Throws:
Exception

testSimpleTemplate

public void testSimpleTemplate()
                        throws Exception
Tests loading and rendering of a simple template. If that works, we are able to get data from the database.

Throws:
Exception

testUnicode

public void testUnicode()
                 throws Exception
Throws:
Exception

testRenderTool

public void testRenderTool()
                    throws Exception
Now we have a more complex example. Run a very simple tool. from the database.

Throws:
Exception

testNullTimestamp

public void testNullTimestamp()
                       throws Exception
Will a NULL timestamp choke the loader?

Throws:
Exception

testMacroInvocation

public void testMacroInvocation()
                         throws Exception
Does it load the global Macros from the DB?

Throws:
Exception

executeTest

protected org.apache.velocity.Template executeTest(String templateName)
                                            throws Exception
Throws:
Exception


Copyright © 2000-2010 The Apache Software Foundation. All Rights Reserved.