org.jmx4odp.junitDiagnosticWorkers
Class BasicJdbcTest

java.lang.Object
  extended by TestCase
      extended by org.jmx4odp.junitDiagnosticWorkers.JdbcClientTest
          extended by org.jmx4odp.junitDiagnosticWorkers.BasicJdbcTest

public class BasicJdbcTest
extends JdbcClientTest

This test will connect to a JDBC data source, issue a SQL statement, and make sure that enough rows were returned.

Author:
Lucas McGregor

Constructor Summary
BasicJdbcTest()
          Creates a new instance of HttpUrlTest
 
Method Summary
 java.lang.String getDriverName()
          Access the jdbc driver name.
 java.lang.String getPassword()
          Access the jdbc source password.
 java.lang.String getSelectSql()
          Access the sql select statement that is run on the datasource
 int getSelectThreshold()
          Access the ammount of rows that need to be returned for a valid requests.
 java.lang.String getUrl()
          Access the jdbc source url.
 java.lang.String getUsername()
          Access the jdbc source username.
 void setDriverName(java.lang.String s)
          Access the jdbc driver name.
 void setPassword(java.lang.String s)
          Access the jdbc source password.
 void setSelectSql(java.lang.String s)
          Access the sql select statement that is run on the datasource
 void setSelectThreshold(int i)
          Access the ammount of rows that need to be returned for a valid requests.
 void setUrl(java.lang.String s)
          Access the jdbc source url.
 void setUsername(java.lang.String s)
          Access the jdbc source username.
 void test_CanConnect()
          Get a connection to the database and make sure that it is connected.
 void test_SelectGood()
          Get a connection to the database, issue the sql statement, and verify that the threshold ammount of rows are returned.
 
Methods inherited from class org.jmx4odp.junitDiagnosticWorkers.JdbcClientTest
assertJdbcConnected, assertJdbcIsCurrent, assertJdbcRecordCountIs, assertJdbcRecordCountIs, assertJdbcRecordCountIsNoLessThan, assertJdbcRecordCountIsNoLessThan, assertJdbcRecordCountIsNoMoreThan, assertJdbcRecordCountIsNoMoreThan, getConnection, getConnection, getConnectionHashtable, getConnectionParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicJdbcTest

public BasicJdbcTest()
Creates a new instance of HttpUrlTest

Method Detail

setSelectThreshold

public void setSelectThreshold(int i)
Access the ammount of rows that need to be returned for a valid requests.


setSelectSql

public void setSelectSql(java.lang.String s)
Access the sql select statement that is run on the datasource


setDriverName

public void setDriverName(java.lang.String s)
Access the jdbc driver name.


setUrl

public void setUrl(java.lang.String s)
Access the jdbc source url.


setUsername

public void setUsername(java.lang.String s)
Access the jdbc source username.


setPassword

public void setPassword(java.lang.String s)
Access the jdbc source password.


getSelectThreshold

public int getSelectThreshold()
Access the ammount of rows that need to be returned for a valid requests.


getSelectSql

public java.lang.String getSelectSql()
Access the sql select statement that is run on the datasource


getDriverName

public java.lang.String getDriverName()
Access the jdbc driver name.


getUrl

public java.lang.String getUrl()
Access the jdbc source url.


getUsername

public java.lang.String getUsername()
Access the jdbc source username.


getPassword

public java.lang.String getPassword()
Access the jdbc source password.


test_CanConnect

public void test_CanConnect()
Get a connection to the database and make sure that it is connected.


test_SelectGood

public void test_SelectGood()
Get a connection to the database, issue the sql statement, and verify that the threshold ammount of rows are returned.