jimm.datavision.test
Class QueryTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by jimm.datavision.test.QueryTest
All Implemented Interfaces:
junit.framework.Test

public class QueryTest
extends junit.framework.TestCase

Reads a report from an XML file, tests its structure, and tests various pieces like parameter and formula substitution.

Author:
Jim Menard, jimm@io.com

Field Summary
protected static java.io.File EXAMPLE_REPORT
           
protected static java.io.File OUT_FILE
           
protected static java.io.File PARAMETER_XML_FILE_NAME
           
protected  SQLQuery query
           
protected  Report report
           
 
Constructor Summary
QueryTest(java.lang.String name)
           
 
Method Summary
protected  void displayQueryTest(java.lang.String whereClause, java.lang.String answer)
           
static void main(java.lang.String[] args)
           
protected  void preparedQueryTest(java.lang.String whereClause, java.lang.String answer)
           
 void setUp()
           
static junit.framework.Test suite()
           
 void testManualParameter()
           
 void testQueryDateParam()
           
 void testQueryListSubstitution()
           
 void testQueryRangeSubstitution()
           
 void testQueryUserColPrep()
           
 void testQueryWhereClauseDisplay()
           
 void testWhereClauseContainsParam()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, 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
 

Field Detail

EXAMPLE_REPORT

protected static final java.io.File EXAMPLE_REPORT

PARAMETER_XML_FILE_NAME

protected static final java.io.File PARAMETER_XML_FILE_NAME

OUT_FILE

protected static final java.io.File OUT_FILE

query

protected SQLQuery query

report

protected Report report
Constructor Detail

QueryTest

public QueryTest(java.lang.String name)
Method Detail

suite

public static junit.framework.Test suite()

setUp

public void setUp()
           throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

preparedQueryTest

protected void preparedQueryTest(java.lang.String whereClause,
                                 java.lang.String answer)

testQueryRangeSubstitution

public void testQueryRangeSubstitution()

testQueryListSubstitution

public void testQueryListSubstitution()

displayQueryTest

protected void displayQueryTest(java.lang.String whereClause,
                                java.lang.String answer)

testQueryWhereClauseDisplay

public void testQueryWhereClauseDisplay()

testQueryDateParam

public void testQueryDateParam()

testQueryUserColPrep

public void testQueryUserColPrep()

testWhereClauseContainsParam

public void testWhereClauseContainsParam()

testManualParameter

public void testManualParameter()
                         throws java.lang.Exception
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)