fixed testcase

This commit is contained in:
高铁
2016-06-01 09:00:59 +08:00
parent 72852915a3
commit 664bf51db6
@@ -35,6 +35,13 @@ public class MSSQLValidConnectionCheckerTest extends TestCase {
MockConnection conn = new MockConnection();
conn.setError(new SQLException());
Assert.assertFalse(checker.isValidConnection(conn, "select 1", 10));
SQLException error = null;
try {
checker.isValidConnection(conn, "select 1", 10);
} catch (SQLException ex) {
error = ex;
}
Assert.assertNotNull(error);
Assert.assertSame(error, conn.getError());
}
}