|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.workingdogs.village.TestMySQL
This class is used for testing the functionality of this product. While creating this code, I have closed many potential bugs, but I'm sure that others still exist. Thus, if you find a bug in Village, please add to this test suite so that the bug will be sure to be fixed in future versions.
In order to do the testing, you will need to be able to connect via JDBC to your database. Since I use MySQL http://www.mysql.com/ , this testing suite is best for that database. I also use the mm MySQL drivers http://www.worldserver.com/mm.mysql/ because it is the best driver that I have found for MySQL.
Note that Village should work with any JDBC compliant driver.
Here is the schema that this test expects ( you should be able to copy and paste it into your MySQL database that you want to use ):
CREATE TABLE test ( a TINYINT null, b SMALLINT null, c MEDIUMINT null, d INT null, e INTEGER null, f BIGINT null, g REAL null, h DOUBLE null, i FLOAT null, j DECIMAL(8,1) null, k NUMERIC(8,1) null, l CHAR(255) null, m VARCHAR(255) null, n DATE null, o TIME null, p TIMESTAMP null, q DATETIME null, r TINYBLOB null, s BLOB null, t MEDIUMBLOB null, u LONGBLOB null, v TINYTEXT null, w TEXT null, x MEDIUMTEXT null );
Field Summary | |
(package private) static java.sql.Connection |
conn
The database connection |
private static java.lang.String |
DB_CONNECTION
mm MySQL Driver setup |
private static java.lang.String |
DB_DRIVER
mm MySQL Driver setup |
private static java.lang.String |
DB_HOST
This is the name of the machine that is hosting the MySQL server |
private static java.lang.String |
DB_NAME
This is the name of the database. |
private static java.lang.String |
DB_PASS
the password for the user |
private static java.lang.String |
DB_TABLE
This is the name of the table in the DB_NAME |
private static java.lang.String |
DB_USER
This is the user to log into the database as. |
private static boolean |
debugging
used for debugging |
private static int |
FAILED
used for debugging |
private static int |
num
used for debugging |
private static int |
PASSED
used for debugging |
private static int |
QDS
used for debugging |
private static int |
TDS
used for debugging |
private static int |
testCount
used for debugging |
Constructor Summary | |
TestMySQL()
|
Method Summary | |
static void |
debug(int type,
java.lang.Exception e)
|
static void |
debug(int type,
java.lang.String method)
|
static void |
debug(int type,
java.lang.String method,
int value)
|
static void |
debug(int type,
java.lang.String method,
java.lang.String value)
|
static void |
getConnection()
|
static void |
main(java.lang.String[] argv)
|
static void |
test(int type,
int test,
int value)
|
static void |
test(int type,
java.lang.String test,
java.lang.String value)
|
static void |
testDeleteSomeRecords()
This test verifies that deleting multiple records actually works. |
static void |
testQueryDataSet()
|
static void |
testRemoveRecord()
This test will throw a DataSetException. |
static void |
testTableDataSet()
|
static void |
testTableDataSet2()
|
static void |
testTableDataSet3()
|
static void |
testTableDataSet4()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static java.sql.Connection conn
private static java.lang.String DB_NAME
private static java.lang.String DB_TABLE
private static java.lang.String DB_HOST
private static java.lang.String DB_USER
private static java.lang.String DB_PASS
private static java.lang.String DB_DRIVER
private static java.lang.String DB_CONNECTION
private static boolean debugging
private static int num
private static int testCount
private static int TDS
private static int QDS
private static int PASSED
private static int FAILED
Constructor Detail |
public TestMySQL()
Method Detail |
public static void main(java.lang.String[] argv)
public static void testDeleteSomeRecords()
public static void testRemoveRecord()
public static void testTableDataSet2()
public static void testTableDataSet3()
public static void testTableDataSet4()
public static void testTableDataSet()
public static void testQueryDataSet()
public static void getConnection()
public static void debug(int type, java.lang.Exception e)
public static void debug(int type, java.lang.String method)
public static void debug(int type, java.lang.String method, int value)
public static void test(int type, int test, int value)
public static void test(int type, java.lang.String test, java.lang.String value)
public static void debug(int type, java.lang.String method, java.lang.String value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |