public class DriverUnitTest extends UnitTestBase
Driver class.| Modifier and Type | Class and Description | 
|---|---|
| private static class  | DriverUnitTest.ParseURLTest | 
| static class  | DriverUnitTest.Test_Driver_getPropertyInfoClass used to test  Driver.getPropertyInfo(String, Properties). | 
| static class  | DriverUnitTest.Test_Driver_setupConnectPropertiesClass used to test  Driver.setupConnectProperties(String, java.util.Properties). | 
| Constructor and Description | 
|---|
| DriverUnitTest(java.lang.String name)Constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| static void | addParseURLCorrectTests(TestSuite suite)Creates tests for passing all variants of correct URLs. | 
| private static java.util.Map<java.lang.String,java.util.Properties> | generateAllURLVariants(java.lang.String[] serverTypes,
                      java.lang.String[] hosts,
                      java.lang.String[] ports,
                      java.lang.String[] databases,
                      java.lang.String[][][] properties) | 
| private static java.util.Properties | invokeDriverParseURL(java.lang.String url,
                    java.util.Properties prop) | 
| private void | loadDriverPropertyInfoMap(java.util.Map driverPropertyInfoMap)Retrieve the  DriverPropertyInfoarray fromDriver.getPropertyInfo(String, Properties)and convert it
 into aMapusing thenameproperty for the keys. | 
| static Test | suite()Construct a test suite for this class. | 
| void | test_getPropertyInfo_Choices()Tests that the  DriverPropertyInfoarray returned fromDriver.getPropertyInfo(String, Properties)contains
 the correctchoicesvalue on each of the objects. | 
| void | test_getPropertyInfo_MatchesMessagesProperties()Tests that the  DriverPropertyInfoarray returned fromDriver.getPropertyInfo(String, Properties)matches the list of properties defined inMessages.properties. | 
| void | test_getPropertyInfo_Required()Tests that the  DriverPropertyInfoarray returned fromDriver.getPropertyInfo(String, Properties)contains
 the correctrequiredvalue 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 aSQLException. | 
| 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 aSQLException. | 
| void | testDriverVersion()Test to ensure that the version reported by the driver matches the JAR
 file's name. | 
assertEquals, invokeConstructor, invokeGetInstanceField, invokeInstanceMethod, invokeSetInstanceField, invokeStaticMethod, ucFirstcompareBytes, getLongString, getLongString, getType, getTypemapcompareInputStreams, compareReaders, connect, dropDatabase, dropFunction, dropProcedure, dropTable, dropTrigger, dropType, dropView, dump, dump, dumpAll, dumpKeys, dumpRow, dumpRow, getConnection, getConnection, makeObjects, makeTestTables, setUp, tearDownpublic DriverUnitTest(java.lang.String name)
name - The name of the test.public static Test suite()
DefaultPropertiesTestLibrary after creating
 anonymous DefaultPropertiesTester objects.public void testDriverVersion()
                       throws java.lang.Exception
java.lang.Exceptionpublic 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.public static void addParseURLCorrectTests(TestSuite suite)
Driver.parseURL(String, Properties)private static java.util.Map<java.lang.String,java.util.Properties> generateAllURLVariants(java.lang.String[] serverTypes,
                                                                          java.lang.String[] hosts,
                                                                          java.lang.String[] ports,
                                                                          java.lang.String[] databases,
                                                                          java.lang.String[][][] properties)
private static java.util.Properties invokeDriverParseURL(java.lang.String url,
                                        java.util.Properties prop)
Generated on June 8 2013