net.sourceforge.jtds.jdbc
Class Tds5Test

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended bynet.sourceforge.jtds.jdbc.TestBase
              extended bynet.sourceforge.jtds.jdbc.Tds5Test
All Implemented Interfaces:
junit.framework.Test

public class Tds5Test
extends TestBase

Test case to illustrate use of TDS 5 support.

Version:
$Id: Tds5Test.java,v 1.8.2.1 2009-08-04 10:33:54 ickzon Exp $
Author:
Mike Hutchinson

Field Summary
 
Fields inherited from class net.sourceforge.jtds.jdbc.TestBase
con, props
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
Tds5Test(java.lang.String name)
           
 
Method Summary
private  boolean isVersion12orHigher()
           
private  boolean isVersion15orHigher()
           
static void main(java.lang.String[] args)
           
static junit.framework.Test suite()
           
 void testBigint()
          Test Sybase ASE 15+ bigint data type.
 void testColMetaData()
          Test the new column meta data made available in Sybase 12
 void testDateTime()
          Test the new date and time data types in Sybase 12+
 void testImageText()
          Test for bug [1161609] Text or image data truncated on Sybase 12.5
 void testLongData()
          Test varchar and varbinary fields longer than 255 bytes.
 void testNullUniText()
           
 void testResultSetMetaData()
          Test that resultset meta data is correct for short varchar/varbinary types.
 void testResultSetMetaData2()
          Test that resultset meta data is correct for long varchar/varbinary types.
 void testResultSetMetaData3()
          Test Sybase ASE misc data type metadata.
 void testResultSetMetaData4()
          Test Sybase ASE 15+ misc data type metadata.
 void testStreamImage()
          Test writing image data from InputStream
 void testStreamText()
          Test writing text data from Reader
 void testStreamUniText()
          Test writing unitext data from Reader
 void testUniText()
          Test writing unitext data from memory
 void testUnsignedBigInt()
          Test Sybase ASE 15+ unsigned bigint data type.
 void testUnsignedInt()
          Test Sybase ASE 15+ unsigned int data type.
 void testUnsignedSmallInt()
          Test Sybase ASE 15+ unsigned smallint data type.
 
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

Tds5Test

public Tds5Test(java.lang.String name)
Method Detail

suite

public static junit.framework.Test suite()

testColMetaData

public void testColMetaData()
                     throws java.lang.Exception
Test the new column meta data made available in Sybase 12

Throws:
java.lang.Exception

testDateTime

public void testDateTime()
                  throws java.lang.Exception
Test the new date and time data types in Sybase 12+

Throws:
java.lang.Exception

testLongData

public void testLongData()
                  throws java.lang.Exception
Test varchar and varbinary fields longer than 255 bytes. Test univarchar columns as well.

Throws:
java.lang.Exception

testImageText

public void testImageText()
                   throws java.lang.Exception
Test for bug [1161609] Text or image data truncated on Sybase 12.5

Throws:
java.lang.Exception

testStreamImage

public void testStreamImage()
                     throws java.lang.Exception
Test writing image data from InputStream

Throws:
java.lang.Exception

testStreamText

public void testStreamText()
                    throws java.lang.Exception
Test writing text data from Reader

Throws:
java.lang.Exception

testStreamUniText

public void testStreamUniText()
                       throws java.lang.Exception
Test writing unitext data from Reader

Throws:
java.lang.Exception

testUniText

public void testUniText()
                 throws java.lang.Exception
Test writing unitext data from memory

Throws:
java.lang.Exception

testNullUniText

public void testNullUniText()
                     throws java.lang.Exception
Throws:
java.lang.Exception

testBigint

public void testBigint()
                throws java.lang.Exception
Test Sybase ASE 15+ bigint data type.

Throws:
java.lang.Exception

testUnsignedSmallInt

public void testUnsignedSmallInt()
                          throws java.lang.Exception
Test Sybase ASE 15+ unsigned smallint data type.

Throws:
java.lang.Exception

testUnsignedInt

public void testUnsignedInt()
                     throws java.lang.Exception
Test Sybase ASE 15+ unsigned int data type.

Throws:
java.lang.Exception

testUnsignedBigInt

public void testUnsignedBigInt()
                        throws java.lang.Exception
Test Sybase ASE 15+ unsigned bigint data type.

Throws:
java.lang.Exception

testResultSetMetaData2

public void testResultSetMetaData2()
                            throws java.lang.Exception
Test that resultset meta data is correct for long varchar/varbinary types.

Throws:
java.lang.Exception

testResultSetMetaData

public void testResultSetMetaData()
                           throws java.lang.Exception
Test that resultset meta data is correct for short varchar/varbinary types. Demonstrate fix to bug [1453552].

Throws:
java.lang.Exception

testResultSetMetaData3

public void testResultSetMetaData3()
                            throws java.lang.Exception
Test Sybase ASE misc data type metadata.

Throws:
java.lang.Exception

testResultSetMetaData4

public void testResultSetMetaData4()
                            throws java.lang.Exception
Test Sybase ASE 15+ misc data type metadata.

Throws:
java.lang.Exception

isVersion12orHigher

private boolean isVersion12orHigher()
                             throws java.lang.Exception
Throws:
java.lang.Exception

isVersion15orHigher

private boolean isVersion15orHigher()
                             throws java.lang.Exception
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)


Generated on October 27 2012