|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--junit.framework.Assert
|
+--junit.framework.TestCase
|
+--net.sourceforge.jtds.test.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 |
fName |
| 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_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_progName()
Test the progName property. |
void |
test_sendStringParametersAsUnicode()
Test the sendStringParametersAsUnicode property. |
void |
test_serverType()
Test the serverType property. |
void |
test_tcpNoDelay()
Test the tcpNoDelay property. |
void |
test_tds()
Test the tds (version) property. |
void |
test_wsid()
Test the wsid property. |
protected java.lang.String |
ucFirst(java.lang.String s)
Changes the first character of a string to uppercase. |
| 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, failNotEquals, failNotSame, failSame, format |
| Methods inherited from class java.lang.Object |
|
| 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_lastUpdateCount()
lastUpdateCount property.public void test_lobBuffer()
lobBuffer property.public void test_loginTimeout()
loginTimeout 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_tcpNoDelay()
tcpNoDelay 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.protected java.lang.String ucFirst(java.lang.String s)
s - The string to be processed.s if it is null or zero length,
else the string with the first character changed to uppercase.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||