DriverUnitTest (jTDS API)
Keywords: net.sourceforge.jtds.test.DriverUnitTest class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sourceforge.jtds.test
Class DriverUnitTest

    java.lang.Object
      junit.framework.Assert
          junit.framework.TestCase
              net.sourceforge.jtds.test.UnitTestBase
                  net.sourceforge.jtds.test.DriverUnitTest

All Implemented Interfaces:
  junit.framework.Test

public class DriverUnitTest
extends UnitTestBase

Unit tests for the `Driver` class.

Version:
  $Id: DriverUnitTest.java,v 1.20 2007/07/08 18:08:54 bheineman Exp $
Author:
  David D. Kilzer

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 junit.framework.TestCase
``

Constructor Summary
`DriverUnitTest(java.lang.String name)` Constructor.

Method Summary
`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.test.UnitTestBase
`assertEquals, invokeConstructor, invokeGetInstanceField, invokeInstanceMethod, invokeSetInstanceField, invokeStaticMethod, ucFirst`

Methods inherited from class junit.framework.TestCase
`countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, 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

### DriverUnitTest

    public DriverUnitTest(java.lang.String name)

  Constructor.

Parameters:
  `name` - The name of the test.

Method Detail

### suite

    public static junit.framework.Test suite()

  Construct a test suite for this class.

  The test suite includes the tests in this class, and adds tests from `DefaultPropertiesTestLibrary` after creating anonymous `DefaultPropertiesTester` objects.

  Returns:
    The test suite to run.

### test_getPropertyInfo_ThrowsSQLExceptionWithNullProperties

    public 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`.

### test_getPropertyInfo_ThrowsSQLExceptionWithNonNullProperties

    public 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`.

### test_getPropertyInfo_MatchesMessagesProperties

    public void test_getPropertyInfo_MatchesMessagesProperties()

  Tests that the `DriverPropertyInfo` array returned from `Driver.getPropertyInfo(String, Properties)` matches the list of properties defined in `Messages.properties`.

### test_getPropertyInfo_Choices

    public 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.

### test_getPropertyInfo_Required

    public 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.

### loadDriverPropertyInfoMap

    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.

  Parameters:
    `driverPropertyInfoMap` - The map of `DriverPropertyInfo` objects to be populated.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Generated on December 30 2009