public class DBFeatureTest
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
DBFeatureTest.DBTestData
An enumerated set of test data to be used for testing MySQL database server
behavior.
|
static class |
DBFeatureTest.ExitStatus
Exit Status Values
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_CONFIGURATION_FILE
Default configuration file
|
static java.lang.String |
ID
Class ID
|
static java.lang.String |
TestDatabaseName
The name of the temporary database to use for testing.
|
static java.lang.String |
TestTableName
The name of the temporary table to use for testing.
|
Constructor and Description |
---|
DBFeatureTest()
Class to perform the feature tests
|
DBFeatureTest(java.lang.String configurationFile) |
Modifier and Type | Method and Description |
---|---|
boolean |
delete() |
void |
delete(boolean delete)
Sets the delete on completion option.
|
void |
insertGoodValues()
This is a control test.
|
void |
insertInvalidDate()
Tests the server behavior when an invalid date is inserted.
|
void |
insertInvalidDateTime()
Tests the behavior of the database server when an invalid date-time value
is inserted into a datetime field.
|
void |
insertInvalidTime()
Test the behavior of the server when attempting to store an invalid time
into a time field.
|
void |
insertLongVarchar()
This method tests the behavior of the server when a string longer than the
defined length of a varchar column type is inserted into the test table.
|
void |
insertZeroDate()
Tests the behavior of the server when a "zero" date is inserted into a date
field eg.
|
void |
insertZeroDateTime()
Tests the server behavior when a "zero" date-time is inserted into a
DATETIME field.
|
void |
insertZeroTime()
Tests the behavior of the server when a "zero" time is inserted into a time
field.
|
static void |
main(java.lang.String[] arguments) |
void |
testDatabase()
Runs a battery of tests against a mysql database to determine the behavior
of the server under certain situations.
|
public static final java.lang.String ID
public static final java.lang.String DEFAULT_CONFIGURATION_FILE
public static final java.lang.String TestDatabaseName
public static final java.lang.String TestTableName
public DBFeatureTest() throws PIRL.Configuration.Configuration_Exception, PIRL.Database.Database_Exception
PIRL.Configuration.Configuration_Exception
PIRL.Database.Database_Exception
public DBFeatureTest(java.lang.String configurationFile) throws PIRL.Configuration.Configuration_Exception, PIRL.Database.Database_Exception
PIRL.Configuration.Configuration_Exception
PIRL.Database.Database_Exception
public void insertGoodValues() throws PIRL.Database.Database_Exception
PIRL.Database.Database_Exception
- if an error occurs while running the test.public void insertLongVarchar() throws PIRL.Database.Database_Exception
PIRL.Database.Database_Exception
public void insertZeroDate() throws PIRL.Database.Database_Exception
PIRL.Database.Database_Exception
public void insertZeroTime() throws PIRL.Database.Database_Exception
PIRL.Database.Database_Exception
public void insertZeroDateTime() throws PIRL.Database.Database_Exception
PIRL.Database.Database_Exception
#insertZeroDate()}
public void insertInvalidDate() throws PIRL.Database.Database_Exception
PIRL.Database.Database_Exception
public void insertInvalidTime() throws PIRL.Database.Database_Exception
PIRL.Database.Database_Exception
public void insertInvalidDateTime() throws PIRL.Database.Database_Exception
PIRL.Database.Database_Exception
public void delete(boolean delete)
delete
- - a boolean value indicating if the test table and database
should be deleted upon completion of the testing.delete()
public boolean delete()
delete(boolean)
public void testDatabase() throws PIRL.Database.Database_Exception
delete(boolean)
flag has been set to true, then the test
database and table will be deleted as soon as the tests have been completed.PIRL.Database.Database_Exception
insertGoodValues()
,
insertLongVarchar()
,
insertZeroDate()
,
insertZeroTime()
,
insertZeroDateTime()
,
insertInvalidDate()
,
insertInvalidTime()
,
insertInvalidDateTime()
public static void main(java.lang.String[] arguments)
args
- Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona