use of com.alibaba.druid.pool.PoolableWrapper in project druid by alibaba.
the class PoolableWrapperTest method test_unwrap.
public void test_unwrap() throws Exception {
PoolableWrapper wrapper = new PoolableWrapper(new MockConnection());
Assert.assertEquals(null, wrapper.unwrap(null));
Assert.assertEquals(true, wrapper.unwrap(PoolableWrapper.class) != null);
Assert.assertEquals(true, wrapper.unwrap(MockConnection.class) != null);
}
use of com.alibaba.druid.pool.PoolableWrapper in project druid by alibaba.
the class PoolableWrapperTest method test_isWrapper.
public void test_isWrapper() throws Exception {
PoolableWrapper wrapper = new PoolableWrapper(new MockConnection());
Assert.assertEquals(false, wrapper.isWrapperFor(null));
Assert.assertEquals(true, wrapper.isWrapperFor(PoolableWrapper.class));
Assert.assertEquals(true, wrapper.isWrapperFor(MockConnection.class));
}
Aggregations