jimm.datavision.test
Class AggregateTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
jimm.datavision.test.AggregateTest
- All Implemented Interfaces:
- junit.framework.Test
public class AggregateTest
- extends junit.framework.TestCase
Tests the aggregate functions by reading a report from an XML file, running
it, and verifying the output.
These tests are tightly coupled with the contents of the file
aggregate_test.xml
and the contents of the data generated by
a MockAggregateDataSource
.
- Author:
- Jim Menard, jimm@io.com
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 |
EXAMPLE_REPORT
protected static final java.io.File EXAMPLE_REPORT
OUT_FILE
protected static final java.io.File OUT_FILE
report
protected Report report
aggrFields
protected java.util.Collection aggrFields
AggregateTest
public AggregateTest(java.lang.String name)
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
tearDown
public void tearDown()
- Overrides:
tearDown
in class junit.framework.TestCase
testSum
public void testSum()
throws java.io.IOException,
java.io.FileNotFoundException
- Throws:
java.io.IOException
java.io.FileNotFoundException
testMin
public void testMin()
throws java.io.IOException,
java.io.FileNotFoundException
- Throws:
java.io.IOException
java.io.FileNotFoundException
testMax
public void testMax()
throws java.io.IOException,
java.io.FileNotFoundException
- Throws:
java.io.IOException
java.io.FileNotFoundException
testCount
public void testCount()
throws java.io.IOException,
java.io.FileNotFoundException
- Throws:
java.io.IOException
java.io.FileNotFoundException
testAverage
public void testAverage()
throws java.io.IOException,
java.io.FileNotFoundException
- Throws:
java.io.IOException
java.io.FileNotFoundException
testStddev
public void testStddev()
throws java.io.IOException,
java.io.FileNotFoundException
- Throws:
java.io.IOException
java.io.FileNotFoundException
runTest
public void runTest(java.lang.String funcName,
java.lang.String[] expected)
throws java.io.IOException,
java.io.FileNotFoundException
- Throws:
java.io.IOException
java.io.FileNotFoundException
setAggregateFieldFunction
protected void setAggregateFieldFunction(java.lang.String function)
expect
protected void expect(int lineNum,
java.lang.String value,
java.io.BufferedReader in)
throws java.io.IOException
- Throws:
java.io.IOException
testHasParameterFields
public void testHasParameterFields()
main
public static void main(java.lang.String[] args)