Package com.alibaba.druid.pool

Examples of com.alibaba.druid.pool.PoolableWrapper


import com.alibaba.druid.pool.PoolableWrapper;

public class PoolableWrapperTest extends TestCase {

    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));
    }
View Full Code Here


        Assert.assertEquals(true, wrapper.isWrapperFor(PoolableWrapper.class));
        Assert.assertEquals(true, wrapper.isWrapperFor(MockConnection.class));
    }

    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);
    }
View Full Code Here

TOP

Related Classes of com.alibaba.druid.pool.PoolableWrapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.