public class BaseLoad100TestSetup extends CleanDatabaseTestSetup
Modifier and Type | Field and Description |
---|---|
private boolean |
binaryData |
protected int |
rowsToLoad |
protected java.lang.String |
tableName |
Constructor and Description |
---|
BaseLoad100TestSetup(junit.framework.Test test) |
BaseLoad100TestSetup(junit.framework.Test test,
int rowsToLoad) |
BaseLoad100TestSetup(junit.framework.Test test,
int rowsToLoad,
java.lang.String tableName) |
BaseLoad100TestSetup(junit.framework.Test test,
int rowsToLoad,
java.lang.String tableName,
boolean binaryData) |
BaseLoad100TestSetup(junit.framework.Test test,
java.lang.String tableName) |
Modifier and Type | Method and Description |
---|---|
private java.lang.Object |
convertData(java.lang.String string)
Convert a string to a data type appropriate for the columns c6 to c9,
that is, either a
String value or a byte[] value. |
protected void |
decorateSQL(java.sql.Statement s)
Override the decorateSQL and create the necessary schema.
|
private void |
loadData(java.sql.PreparedStatement insert)
Load the data into the table.
|
protected void |
setUp()
Clean the default database using the default connection
and calls the decorateSQL to allow sub-classes to
initialize their schema requirments.
|
cleanDatabase, tearDown
getConnection, getTestConfiguration, println
run
basicRun, countTestCases, getTest, toString
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, failNotEquals, failNotSame, failSame, format
protected int rowsToLoad
protected java.lang.String tableName
private boolean binaryData
public BaseLoad100TestSetup(junit.framework.Test test)
test
- public BaseLoad100TestSetup(junit.framework.Test test, int rowsToLoad)
test
- name of testrowsToLoad
- number of rows to insertpublic BaseLoad100TestSetup(junit.framework.Test test, java.lang.String tableName)
test
- name of the testtableName
- name of the table to insert the rows intopublic BaseLoad100TestSetup(junit.framework.Test test, int rowsToLoad, java.lang.String tableName)
test
- name of testrowsToLoad
- number of rows to inserttableName
- name of the table to insert the rows intopublic BaseLoad100TestSetup(junit.framework.Test test, int rowsToLoad, java.lang.String tableName, boolean binaryData)
test
- name of testrowsToLoad
- number of rows to inserttableName
- name of the table to insert the rows intobinaryData
- whether or not c6, ..., c9 should contain binary dataprotected void setUp() throws java.lang.Exception
setUp
in class CleanDatabaseTestSetup
java.lang.Exception
protected void decorateSQL(java.sql.Statement s) throws java.sql.SQLException
decorateSQL
in class CleanDatabaseTestSetup
java.sql.SQLException
CleanDatabaseTestSetup.decorateSQL(java.sql.Statement)
private void loadData(java.sql.PreparedStatement insert) throws java.lang.Exception
insert
- prepared statement to use for inserting data.java.lang.Exception
private java.lang.Object convertData(java.lang.String string) throws java.io.IOException
String
value or a byte[]
value.string
- the string to generate the value fromstring
, or a byte[]
value representing
string
if binaryData
is true
java.io.IOException
- if the string cannot be converted to a byte arrayApache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.