|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert junit.framework.TestCase net.sourceforge.jtds.jdbc.DefaultPropertiesTestLibrary
Library for testing default properties.
Uses aDefaultPropertiesTester
object to test different methods
in different classes.
To extend this class, the programmer must implement the following items:
#tester
field in a public
default
constructor that takes no arguments.public static Test suite()
method that takes one or more
arguments. (The suite()
method in this class should
not be overridden.)
Field Summary | |
private boolean |
onlySqlServerTests
If true, only run tests for SQL Server, not Sybase. |
private boolean |
onlyTds70Tests
If true, only run tests for TDS 7.0. |
private DefaultPropertiesTester |
tester
Object used to run all of the tests. |
private static java.lang.String |
URL_SQLSERVER
Test JDBC URL for SQL Server. |
private static java.lang.String |
URL_SYBASE
Test JDBC URL for Sybase. |
Fields inherited from class junit.framework.TestCase |
|
Constructor Summary | |
DefaultPropertiesTestLibrary()
Default constructor. |
Method Summary | |
private void |
assertDefaultPropertyByServerType(java.lang.String url,
java.lang.String key,
java.lang.String fieldName,
java.lang.String expected)
Assert that the expected property value is set using
a given url . |
private void |
assertDefaultPropertyByTdsVersion(java.lang.String url,
java.lang.String tdsVersion,
java.lang.String key,
java.lang.String fieldName,
java.lang.String expected)
Assert that the expected property value is set using
a given url and tdsVersion property. |
protected DefaultPropertiesTester |
getTester()
Getter for tester . |
boolean |
isOnlySqlServerTests()
Getter for #onlySqlServerTests . |
boolean |
isOnlyTds70Tests()
Getter for #onlyTds70Tests . |
protected void |
setOnlySqlServerTests(boolean onlySqlServerTests)
Setter for onlySqlServerTests . |
protected void |
setOnlyTds70Tests(boolean onlyTds70Tests)
Setter for onlyTds70Tests . |
void |
setTester(DefaultPropertiesTester tester)
Setter for #tester . |
static junit.framework.Test |
suite()
Provides a null test suite so that JUnit will not try to instantiate this class directly. |
void |
test_appName()
Test the appName property. |
void |
test_batchSize()
Test the batchSize property. |
void |
test_bindAddress()
Test the bindAddress property. |
void |
test_bufferDir()
Test the bufferDir property. |
void |
test_bufferMaxMemory()
Test the bufferMaxMemory property. |
void |
test_bufferMinPackets()
Test the bufferMinPackets property. |
void |
test_cacheMetaData()
Test the cacheMetaData property. |
void |
test_databaseName()
Test the databaseName property. |
void |
test_lastUpdateCount()
Test the lastUpdateCount property. |
void |
test_lobBuffer()
Test the lobBuffer property. |
void |
test_loginTimeout()
Test the loginTimeout property. |
void |
test_macAddress()
Test the macAddress property. |
void |
test_namedPipe()
Test the namedPipe property. |
void |
test_packetSize()
Test the packetSize property. |
void |
test_portNumber()
Test the portNumber property.
|
void |
test_prepareSql()
Test the prepareSql property. |
void |
test_processId()
Test the processId property. |
void |
test_progName()
Test the progName property. |
void |
test_sendStringParametersAsUnicode()
Test the sendStringParametersAsUnicode property. |
void |
test_serverType()
Test the serverType property.
|
void |
test_socketKeepAlive()
Test the socketKeepAlive property. |
void |
test_socketTimeout()
Test the socketTimeout property. |
void |
test_tcpNoDelay()
Test the tcpNoDelay property. |
void |
test_tds()
Test the tds (version) property. |
void |
test_useCursors()
Test the useCursors property. |
void |
test_useJCIFS()
Test the useJCIFS property. |
void |
test_useLOBs()
Test the useLOBs property. |
void |
test_wsid()
Test the wsid property. |
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 |
Field Detail |
private static final java.lang.String URL_SQLSERVER
private static final java.lang.String URL_SYBASE
private DefaultPropertiesTester tester
private boolean onlySqlServerTests
private boolean onlyTds70Tests
Constructor Detail |
public DefaultPropertiesTestLibrary()
#tester
field in a public
default constructor.
Method Detail |
public static final junit.framework.Test suite()
null
).public void test_serverType()
serverType
property.
Different values are set depending on whether SQL Server or
Sybase is used.
public void test_tds()
tds
(version) property.
public void test_portNumber()
portNumber
property.
Different values are set depending on whether SQL Server or
Sybase is used.
public void test_databaseName()
databaseName
property.
public void test_appName()
appName
property.
public void test_bindAddress()
bindAddress
property.
public void test_lastUpdateCount()
lastUpdateCount
property.
public void test_lobBuffer()
lobBuffer
property.
public void test_loginTimeout()
loginTimeout
property.
public void test_socketTimeout()
socketTimeout
property.
public void test_socketKeepAlive()
socketKeepAlive
property.
public void test_processId()
processId
property.
public void test_macAddress()
macAddress
property.
public void test_namedPipe()
namedPipe
property.
public void test_packetSize()
packetSize
property.
public void test_prepareSql()
prepareSql
property.
public void test_progName()
progName
property.
public void test_sendStringParametersAsUnicode()
sendStringParametersAsUnicode
property.
public void test_batchSize()
batchSize
property.
public void test_bufferDir()
bufferDir
property.
public void test_bufferMaxMemory()
bufferMaxMemory
property.
public void test_bufferMinPackets()
bufferMinPackets
property.
public void test_cacheMetaData()
cacheMetaData
property.
public void test_tcpNoDelay()
tcpNoDelay
property.
public void test_useCursors()
useCursors
property.
public void test_useJCIFS()
useJCIFS
property.
public void test_useLOBs()
useLOBs
property.
public void test_wsid()
wsid
property.
private void assertDefaultPropertyByTdsVersion(java.lang.String url, java.lang.String tdsVersion, java.lang.String key, java.lang.String fieldName, java.lang.String expected)
expected
property value is set using
a given url
and tdsVersion
property.
url
- The JDBC URL.tdsVersion
- The TDS version.key
- The message key.fieldName
- The field name used in the class.expected
- The expected value of the property.private void assertDefaultPropertyByServerType(java.lang.String url, java.lang.String key, java.lang.String fieldName, java.lang.String expected)
expected
property value is set using
a given url
.
url
- The JDBC URL.key
- The message key.fieldName
- The field name used in the class.expected
- The expected value of the property.protected DefaultPropertiesTester getTester()
tester
.
tester
.public void setTester(DefaultPropertiesTester tester)
#tester
.
tester
- The value to set #tester
to.public boolean isOnlySqlServerTests()
#onlySqlServerTests
.
#onlySqlServerTests
.protected void setOnlySqlServerTests(boolean onlySqlServerTests)
onlySqlServerTests
.
onlySqlServerTests
- The value to set onlySqlServerTests
to.public boolean isOnlyTds70Tests()
#onlyTds70Tests
.
#onlyTds70Tests
.protected void setOnlyTds70Tests(boolean onlyTds70Tests)
onlyTds70Tests
.
onlyTds70Tests
- The value to set onlyTds70Tests
to.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |