Package com.alibaba.druid.bvt.pool

Source Code of com.alibaba.druid.bvt.pool.DataSourceDisableExceptionTest

package com.alibaba.druid.bvt.pool;

import org.junit.Assert;
import junit.framework.TestCase;

import com.alibaba.druid.pool.DataSourceDisableException;

public class DataSourceDisableExceptionTest extends TestCase {
    public void test_0() throws Exception {
        DataSourceDisableException ex = new DataSourceDisableException();
        Assert.assertEquals(null, ex.getMessage());
    }
   
    public void test_1() throws Exception {
        DataSourceDisableException ex = new DataSourceDisableException("XXX");
        Assert.assertEquals("XXX", ex.getMessage());
    }
   
    public void test_2() throws Exception {
        DataSourceDisableException ex = new DataSourceDisableException(new IllegalStateException());
        Assert.assertTrue(ex.getCause() instanceof IllegalStateException);
    }
}
TOP

Related Classes of com.alibaba.druid.bvt.pool.DataSourceDisableExceptionTest

TOP
Copyright © 2018 www.massapi.com. 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.