Updating test to verify that the wrapped connection is set to null on close (not unset)
This mocks connect(), sets the internal _conn to an object, then calls close, which should re-set _conn back to null. The getWrappedConnection() call gives us access to _conn, but does NOT trigger a re-connect, since we mocked connect() to do nothing. Ultimately, if _conn is unset, calling getWrappedConnection() will error. If _conn is not set to null, the test will fail. This tests all the cases.
Showing
Please register or sign in to comment