JtdsDataSourceUnitTest.Test_JtdsDataSource_getConnection (jTDS API)
Keywords: net.sourceforge.jtds.test.JtdsDataSourceUnitTest.Test_JtdsDataSource_getConnection 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 JtdsDataSourceUnitTest.Test_JtdsDataSource_getConnection

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

All Implemented Interfaces:
  junit.framework.Test

Enclosing class:
  JtdsDataSourceUnitTest

public static class JtdsDataSourceUnitTest.Test_JtdsDataSource_getConnection
extends UnitTestBase

Field Summary

Fields inherited from class junit.framework.TestCase
``

Constructor Summary
`JtdsDataSourceUnitTest.Test_JtdsDataSource_getConnection(java.lang.String name)`

Method Summary
`static junit.framework.Test` | `suite()` Provides a null test suite so that JUnit will not try to instantiate this class directly.
`void` | `testDefaultTdsVersion()` Test connecting without specifying TDS version.
`void` | `testNoHost()` Test connecting without specifying a host.
`void` | `testNormal()` Test connecting with the settings in connection.properties.
`void` | `testNoUser()` Test connecting without specifying a user.

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

### JtdsDataSourceUnitTest.Test_JtdsDataSource_getConnection

    public JtdsDataSourceUnitTest.Test_JtdsDataSource_getConnection(java.lang.String name)

Method Detail

### suite

    public static final junit.framework.Test suite()

  Provides a null test suite so that JUnit will not try to instantiate this class directly.

  Returns:
    The test suite (always `null`).

### testNoHost

    public void testNoHost()

  Test connecting without specifying a host. Should get an SQL state of 08001 (SQL client unable to establish SQL connection).

### testNoUser

    public void testNoUser()

  Test connecting without specifying a user. Should get an SQL state of either 28000 (invalid authorization specification) or 08S01 (bad host name).

### testNormal

    public void testNormal()

  Test connecting with the settings in connection.properties.

  Should also test bug [1051595] jtdsDataSource connects only to localhost.

### testDefaultTdsVersion

    public void testDefaultTdsVersion()

  Test connecting without specifying TDS version.

  Test for bug [1113709] Connecting via DataSource. Issue was caused by JtdsDataSource setting the default values in the constructor, so the TDS version was always set to 8.0 unless explicitly modified.

  The incorrect behavior occured when connecting to Sybase (when the TDS version should have been 5.0 by default).

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