net.sourceforge.openforecast.tests
Class CSVBuilderTest
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- net.sourceforge.openforecast.tests.OpenForecastTestCase
-
- net.sourceforge.openforecast.tests.CSVBuilderTest
-
- All Implemented Interfaces:
- junit.framework.Test
public class CSVBuilderTest extends OpenForecastTestCase
-
-
Constructor Summary
Constructors Constructor and Description CSVBuilderTest(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidtestCSVBuilder()Tests the correct initialization of a DataSet from a CSV file.voidtestExtremeCSVBuilder()Tests the correct initialization of a DataSet from a CSV file where the input is valid, yet poorly and irregularly formatted.voidtestUnknownHeaderWithHeader()Tests the correct initialization of a DataSet from a CSV file when the CSVBuilder does not know whether or not there is a header row and the CSV file contains one.voidtestUnknownHeaderWithoutHeader()Tests the correct initialization of a DataSet from a CSV file when the CSVBuilder does not know whether or not there is a header row and the CSV file contains one.-
Methods inherited from class junit.framework.TestCase
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, countTestCases, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, setName, toString
-
-
-
-
Method Detail
-
testExtremeCSVBuilder
public void testExtremeCSVBuilder() throws java.io.FileNotFoundException, java.io.IOExceptionTests the correct initialization of a DataSet from a CSV file where the input is valid, yet poorly and irregularly formatted. For example, the CSVBuilder is supposed to treat as a zero field two commas following each other. This test will also test naming the columns and the use of blank lines and comments in the input.- Throws:
java.io.FileNotFoundExceptionjava.io.IOException
-
testCSVBuilder
public void testCSVBuilder() throws java.io.FileNotFoundException, java.io.IOExceptionTests the correct initialization of a DataSet from a CSV file.- Throws:
java.io.FileNotFoundExceptionjava.io.IOException
-
testUnknownHeaderWithHeader
public void testUnknownHeaderWithHeader() throws java.io.FileNotFoundException, java.io.IOExceptionTests the correct initialization of a DataSet from a CSV file when the CSVBuilder does not know whether or not there is a header row and the CSV file contains one. This tests for the correct "auto detection" of a header row.- Throws:
java.io.FileNotFoundExceptionjava.io.IOException
-
testUnknownHeaderWithoutHeader
public void testUnknownHeaderWithoutHeader() throws java.io.FileNotFoundException, java.io.IOExceptionTests the correct initialization of a DataSet from a CSV file when the CSVBuilder does not know whether or not there is a header row and the CSV file contains one. This tests for the correct "auto detection" of a header row.- Throws:
java.io.FileNotFoundExceptionjava.io.IOException
-
-
DataMelt 3.0 © DataMelt by jWork.ORG