com.mockobjects.sql
public abstract class CommonMockDataSource extends MockObject implements javax.sql.DataSource
Constructor and Description |
---|
CommonMockDataSource() |
Modifier and Type | Method and Description |
---|---|
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.
|
notImplemented, notYetImplemented, verify
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.CommonDataSource
public java.io.PrintWriter getLogWriter()
getLogWriter
in interface javax.sql.CommonDataSource
public void setLoginTimeout(int seconds)
setLoginTimeout
in interface javax.sql.CommonDataSource
public void setLogWriter(java.io.PrintWriter out)
setLogWriter
in interface javax.sql.CommonDataSource
Copyright © 2002 Mock Objects. All Rights Reserved.