|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.mockobjects.MockObject com.mockobjects.sql.CommonMockDataSource
Abstract DataSource for use with mock testing. Only the connection methods have been implemented here. If testing of the log methods is needed, please submit a patch.
Constructor Summary | |
CommonMockDataSource()
|
Method Summary | |
java.sql.Connection |
getConnection()
Returns connection instance passed by setupConnection, and increments the number of connect calls. |
java.sql.Connection |
getConnection(java.lang.String username,
java.lang.String password)
Calls notImplemented. |
int |
getLoginTimeout()
Calls notImplemented. |
java.io.PrintWriter |
getLogWriter()
Calls notImplemented. |
void |
setExpectedConnectCalls(int callCount)
Register the number of connections the test should make. |
void |
setLoginTimeout(int seconds)
Calls notImplemented. |
void |
setLogWriter(java.io.PrintWriter out)
Calls notImplemented. |
void |
setupConnection(java.sql.Connection aConnection)
Pass the connection instance for use with tests. |
Methods inherited from class com.mockobjects.MockObject |
notImplemented, notYetImplemented, verify |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CommonMockDataSource()
Method Detail |
public void setExpectedConnectCalls(int callCount)
public void setupConnection(java.sql.Connection aConnection)
public java.sql.Connection getConnection()
getConnection
in interface javax.sql.DataSource
public java.sql.Connection getConnection(java.lang.String username, java.lang.String password)
getConnection
in interface javax.sql.DataSource
public int getLoginTimeout()
getLoginTimeout
in interface javax.sql.DataSource
public java.io.PrintWriter getLogWriter()
getLogWriter
in interface javax.sql.DataSource
public void setLoginTimeout(int seconds)
setLoginTimeout
in interface javax.sql.DataSource
public void setLogWriter(java.io.PrintWriter out)
setLogWriter
in interface javax.sql.DataSource
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |