|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
net.sourceforge.jtds.jdbc.TestBase
net.sourceforge.jtds.jdbc.DatabaseTestCase
net.sourceforge.jtds.jdbc.UnitTestBase
net.sourceforge.jtds.jdbc.DriverUnitTest
Unit tests for the Driver
class.
Nested Class Summary | |
static class |
DriverUnitTest.Test_Driver_getPropertyInfo
Class used to test Driver.getPropertyInfo(String, Properties) . |
static class |
DriverUnitTest.Test_Driver_setupConnectProperties
Class used to test Driver.setupConnectProperties(String, java.util.Properties) . |
Field Summary |
Fields inherited from class net.sourceforge.jtds.jdbc.DatabaseTestCase |
|
Fields inherited from class net.sourceforge.jtds.jdbc.TestBase |
con, props |
Fields inherited from class junit.framework.TestCase |
|
Constructor Summary | |
DriverUnitTest(java.lang.String name)
Constructor. |
Method Summary | |
private static java.util.Properties |
invokeDriverParseURL(java.lang.String url,
java.util.Properties prop)
|
private void |
loadDriverPropertyInfoMap(java.util.Map driverPropertyInfoMap)
Retrieve the DriverPropertyInfo array from
Driver.getPropertyInfo(String, Properties) and convert it
into a Map using the name property for the keys. |
static junit.framework.Test |
suite()
Construct a test suite for this class. |
void |
test_getPropertyInfo_Choices()
Tests that the DriverPropertyInfo array returned from
Driver.getPropertyInfo(String, Properties) contains
the correct choices value on each of the objects. |
void |
test_getPropertyInfo_MatchesMessagesProperties()
Tests that the DriverPropertyInfo array returned from
Driver.getPropertyInfo(String, Properties)
matches the list of properties defined in Messages.properties . |
void |
test_getPropertyInfo_Required()
Tests that the DriverPropertyInfo array returned from
Driver.getPropertyInfo(String, Properties) contains
the correct required value on each of the objects. |
void |
test_getPropertyInfo_ThrowsSQLExceptionWithNonNullProperties()
Tests that passing in a non-null properties argument to Driver.getPropertyInfo(String, Properties)
causes the url to be parsed, which then throws a SQLException . |
void |
test_getPropertyInfo_ThrowsSQLExceptionWithNullProperties()
Tests that passing in a null properties argument to Driver.getPropertyInfo(String, Properties)
causes the url to be parsed, which then throws a SQLException . |
Methods inherited from class net.sourceforge.jtds.jdbc.UnitTestBase |
assertEquals, invokeConstructor, invokeGetInstanceField, invokeInstanceMethod, invokeSetInstanceField, invokeStaticMethod, ucFirst |
Methods inherited from class net.sourceforge.jtds.jdbc.DatabaseTestCase |
compareBytes, getLongString, getLongString, getType, getTypemap |
Methods inherited from class net.sourceforge.jtds.jdbc.TestBase |
compareInputStreams, compareReaders, connect, dropDatabase, dropFunction, dropProcedure, dropTable, dropTrigger, dropType, dropView, dump, dump, dumpAll, dumpKeys, dumpRow, dumpRow, getConnection, getConnection, makeObjects, makeTestTables, setUp, tearDown |
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 |
Constructor Detail |
public DriverUnitTest(java.lang.String name)
name
- The name of the test.Method Detail |
public static junit.framework.Test suite()
The test suite includes the tests in this class, and adds tests
from DefaultPropertiesTestLibrary
after creating
anonymous DefaultPropertiesTester
objects.
public void test_getPropertyInfo_ThrowsSQLExceptionWithNullProperties()
Driver.getPropertyInfo(String, Properties)
causes the url to be parsed, which then throws a SQLException
.
public void test_getPropertyInfo_ThrowsSQLExceptionWithNonNullProperties()
Driver.getPropertyInfo(String, Properties)
causes the url to be parsed, which then throws a SQLException
.
public void test_getPropertyInfo_MatchesMessagesProperties()
DriverPropertyInfo
array returned from
Driver.getPropertyInfo(String, Properties)
matches the list of properties defined in Messages.properties
.
public void test_getPropertyInfo_Choices()
DriverPropertyInfo
array returned from
Driver.getPropertyInfo(String, Properties)
contains
the correct choices
value on each of the objects.
public void test_getPropertyInfo_Required()
DriverPropertyInfo
array returned from
Driver.getPropertyInfo(String, Properties)
contains
the correct required
value on each of the objects.
private void loadDriverPropertyInfoMap(java.util.Map driverPropertyInfoMap)
DriverPropertyInfo
array from
Driver.getPropertyInfo(String, Properties)
and convert it
into a Map
using the name
property for the keys.
driverPropertyInfoMap
- The map of DriverPropertyInfo
objects to be populated.private static java.util.Properties invokeDriverParseURL(java.lang.String url, java.util.Properties prop)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |