mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
add testcase & bug fixed
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package com.alibaba.druid.bvt.pool;
|
||||
|
||||
import junit.framework.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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user