Package net.officefloor.jdbc.test
Class ValidateConnections
java.lang.Object
net.officefloor.jdbc.test.ValidateConnections
ConnectionDecoratorServiceFactory to validate all created
Connection and PooledConnection instances are closed on
closing OfficeFloor.- Author:
- Daniel Sagenschneider
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ConnectionaddConnection(Connection connection) AddsConnection.static PooledConnectionaddConnection(PooledConnection connection) Adds aPooledConnection.static voidEnsures all connections are closed.static voidEnsure that the previous test has not leaked connections into this test.static intObtains the number of connections registered.
-
Constructor Details
-
ValidateConnections
public ValidateConnections()
-
-
Method Details
-
getConnectionsRegisteredCount
public static int getConnectionsRegisteredCount()Obtains the number of connections registered.- Returns:
- Number of connections registered.
-
assertNoPreviousTestConnections
public static void assertNoPreviousTestConnections()Ensure that the previous test has not leaked connections into this test. -
assertAllConnectionsClosed
public static void assertAllConnectionsClosed()Ensures all connections are closed. -
addConnection
AddsConnection.- Parameters:
connection-Connection.- Returns:
Connection.
-
addConnection
Adds aPooledConnection.- Parameters:
connection-PooledConnection.- Returns:
PooledConnection.
-