Java 类java.sql.SQLTransientConnectionException 实例源码

项目:jdk8u-jdk    文件:SQLTransientConnectionExceptionTests.java   
/**
 * Validate that the ordering of the returned Exceptions is correct
 * using for-each loop
 */
@Test
public void test11() {
    SQLTransientConnectionException ex =
            new SQLTransientConnectionException("Exception 1", t1);
    SQLTransientConnectionException ex1 =
            new SQLTransientConnectionException("Exception 2");
    SQLTransientConnectionException ex2 =
            new SQLTransientConnectionException("Exception 3", t2);
    ex.setNextException(ex1);
    ex.setNextException(ex2);
    int num = 0;
    for (Throwable e : ex) {
        assertTrue(msgs[num++].equals(e.getMessage()));
    }
}
项目:jdk8u-jdk    文件:SQLTransientConnectionExceptionTests.java   
/**
 * Validate that the ordering of the returned Exceptions is correct
 * using traditional while loop
 */
@Test
public void test12() {
    SQLTransientConnectionException ex =
            new SQLTransientConnectionException("Exception 1", t1);
    SQLTransientConnectionException ex1 =
            new SQLTransientConnectionException("Exception 2");
    SQLTransientConnectionException ex2 =
            new SQLTransientConnectionException("Exception 3", t2);
    ex.setNextException(ex1);
    ex.setNextException(ex2);
    int num = 0;
    SQLException sqe = ex;
    while (sqe != null) {
        assertTrue(msgs[num++].equals(sqe.getMessage()));
        Throwable c = sqe.getCause();
        while (c != null) {
            assertTrue(msgs[num++].equals(c.getMessage()));
            c = c.getCause();
        }
        sqe = sqe.getNextException();
    }
}
项目:openjdk-jdk10    文件:SQLTransientConnectionExceptionTests.java   
/**
 * Validate that the ordering of the returned Exceptions is correct
 * using for-each loop
 */
@Test
public void test11() {
    SQLTransientConnectionException ex =
            new SQLTransientConnectionException("Exception 1", t1);
    SQLTransientConnectionException ex1 =
            new SQLTransientConnectionException("Exception 2");
    SQLTransientConnectionException ex2 =
            new SQLTransientConnectionException("Exception 3", t2);
    ex.setNextException(ex1);
    ex.setNextException(ex2);
    int num = 0;
    for (Throwable e : ex) {
        assertTrue(msgs[num++].equals(e.getMessage()));
    }
}
项目:openjdk-jdk10    文件:SQLTransientConnectionExceptionTests.java   
/**
 * Validate that the ordering of the returned Exceptions is correct
 * using traditional while loop
 */
@Test
public void test12() {
    SQLTransientConnectionException ex =
            new SQLTransientConnectionException("Exception 1", t1);
    SQLTransientConnectionException ex1 =
            new SQLTransientConnectionException("Exception 2");
    SQLTransientConnectionException ex2 =
            new SQLTransientConnectionException("Exception 3", t2);
    ex.setNextException(ex1);
    ex.setNextException(ex2);
    int num = 0;
    SQLException sqe = ex;
    while (sqe != null) {
        assertTrue(msgs[num++].equals(sqe.getMessage()));
        Throwable c = sqe.getCause();
        while (c != null) {
            assertTrue(msgs[num++].equals(c.getMessage()));
            c = c.getCause();
        }
        sqe = sqe.getNextException();
    }
}
项目:openjdk9    文件:SQLTransientConnectionExceptionTests.java   
/**
 * Validate that the ordering of the returned Exceptions is correct
 * using for-each loop
 */
@Test
public void test11() {
    SQLTransientConnectionException ex =
            new SQLTransientConnectionException("Exception 1", t1);
    SQLTransientConnectionException ex1 =
            new SQLTransientConnectionException("Exception 2");
    SQLTransientConnectionException ex2 =
            new SQLTransientConnectionException("Exception 3", t2);
    ex.setNextException(ex1);
    ex.setNextException(ex2);
    int num = 0;
    for (Throwable e : ex) {
        assertTrue(msgs[num++].equals(e.getMessage()));
    }
}
项目:openjdk9    文件:SQLTransientConnectionExceptionTests.java   
/**
 * Validate that the ordering of the returned Exceptions is correct
 * using traditional while loop
 */
@Test
public void test12() {
    SQLTransientConnectionException ex =
            new SQLTransientConnectionException("Exception 1", t1);
    SQLTransientConnectionException ex1 =
            new SQLTransientConnectionException("Exception 2");
    SQLTransientConnectionException ex2 =
            new SQLTransientConnectionException("Exception 3", t2);
    ex.setNextException(ex1);
    ex.setNextException(ex2);
    int num = 0;
    SQLException sqe = ex;
    while (sqe != null) {
        assertTrue(msgs[num++].equals(sqe.getMessage()));
        Throwable c = sqe.getCause();
        while (c != null) {
            assertTrue(msgs[num++].equals(c.getMessage()));
            c = c.getCause();
        }
        sqe = sqe.getNextException();
    }
}
项目:jdk8u_jdk    文件:SQLTransientConnectionExceptionTests.java   
/**
 * Validate that the ordering of the returned Exceptions is correct
 * using for-each loop
 */
@Test
public void test11() {
    SQLTransientConnectionException ex =
            new SQLTransientConnectionException("Exception 1", t1);
    SQLTransientConnectionException ex1 =
            new SQLTransientConnectionException("Exception 2");
    SQLTransientConnectionException ex2 =
            new SQLTransientConnectionException("Exception 3", t2);
    ex.setNextException(ex1);
    ex.setNextException(ex2);
    int num = 0;
    for (Throwable e : ex) {
        assertTrue(msgs[num++].equals(e.getMessage()));
    }
}
项目:jdk8u_jdk    文件:SQLTransientConnectionExceptionTests.java   
/**
 * Validate that the ordering of the returned Exceptions is correct
 * using traditional while loop
 */
@Test
public void test12() {
    SQLTransientConnectionException ex =
            new SQLTransientConnectionException("Exception 1", t1);
    SQLTransientConnectionException ex1 =
            new SQLTransientConnectionException("Exception 2");
    SQLTransientConnectionException ex2 =
            new SQLTransientConnectionException("Exception 3", t2);
    ex.setNextException(ex1);
    ex.setNextException(ex2);
    int num = 0;
    SQLException sqe = ex;
    while (sqe != null) {
        assertTrue(msgs[num++].equals(sqe.getMessage()));
        Throwable c = sqe.getCause();
        while (c != null) {
            assertTrue(msgs[num++].equals(c.getMessage()));
            c = c.getCause();
        }
        sqe = sqe.getNextException();
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:SQLTransientConnectionExceptionTests.java   
/**
 * Validate that the ordering of the returned Exceptions is correct
 * using for-each loop
 */
@Test
public void test11() {
    SQLTransientConnectionException ex =
            new SQLTransientConnectionException("Exception 1", t1);
    SQLTransientConnectionException ex1 =
            new SQLTransientConnectionException("Exception 2");
    SQLTransientConnectionException ex2 =
            new SQLTransientConnectionException("Exception 3", t2);
    ex.setNextException(ex1);
    ex.setNextException(ex2);
    int num = 0;
    for (Throwable e : ex) {
        assertTrue(msgs[num++].equals(e.getMessage()));
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:SQLTransientConnectionExceptionTests.java   
/**
 * Validate that the ordering of the returned Exceptions is correct
 * using traditional while loop
 */
@Test
public void test12() {
    SQLTransientConnectionException ex =
            new SQLTransientConnectionException("Exception 1", t1);
    SQLTransientConnectionException ex1 =
            new SQLTransientConnectionException("Exception 2");
    SQLTransientConnectionException ex2 =
            new SQLTransientConnectionException("Exception 3", t2);
    ex.setNextException(ex1);
    ex.setNextException(ex2);
    int num = 0;
    SQLException sqe = ex;
    while (sqe != null) {
        assertTrue(msgs[num++].equals(sqe.getMessage()));
        Throwable c = sqe.getCause();
        while (c != null) {
            assertTrue(msgs[num++].equals(c.getMessage()));
            c = c.getCause();
        }
        sqe = sqe.getNextException();
    }
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, String)
 */
public void test_Constructor_LStringLString() {
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            "MYTESTSTRING1", "MYTESTSTRING2");
    assertNotNull(sQLTransientConnectionException);
    assertEquals(
            "The SQLState of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING2", sQLTransientConnectionException.getSQLState());
    assertEquals(
            "The reason of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING1", sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 0",
            sQLTransientConnectionException.getErrorCode(), 0);

}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(Throwable)
 */
public void test_Constructor_LThrowable() {
    Throwable cause = new Exception("MYTHROWABLE");
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            cause);
    assertNotNull(sQLTransientConnectionException);
    assertEquals(
            "The reason of SQLTransientConnectionException should be equals to cause.toString()",
            "java.lang.Exception: MYTHROWABLE",
            sQLTransientConnectionException.getMessage());
    assertNull(
            "The SQLState of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getSQLState());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 0",
            sQLTransientConnectionException.getErrorCode(), 0);
    assertEquals(
            "The cause of SQLTransientConnectionException set and get should be equivalent",
            cause, sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(Throwable)
 */
public void test_Constructor_LThrowable_1() {
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            (Throwable) null);
    assertNotNull(sQLTransientConnectionException);
    assertNull(
            "The SQLState of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getSQLState());
    assertNull(
            "The reason of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 0",
            sQLTransientConnectionException.getErrorCode(), 0);
    assertNull(
            "The cause of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, Throwable)
 */
public void test_Constructor_LStringLThrowable() {
    Throwable cause = new Exception("MYTHROWABLE");
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            "MYTESTSTRING", cause);
    assertNotNull(sQLTransientConnectionException);
    assertEquals(
            "The reason of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING", sQLTransientConnectionException.getMessage());
    assertNull(
            "The SQLState of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getSQLState());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 0",
            sQLTransientConnectionException.getErrorCode(), 0);
    assertEquals(
            "The cause of SQLTransientConnectionException set and get should be equivalent",
            cause, sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, Throwable)
 */
public void test_Constructor_LStringLThrowable_1() {
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            "MYTESTSTRING", (Throwable) null);
    assertNotNull(sQLTransientConnectionException);
    assertEquals(
            "The reason of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING", sQLTransientConnectionException.getMessage());
    assertNull(
            "The SQLState of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getSQLState());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 0",
            sQLTransientConnectionException.getErrorCode(), 0);
    assertNull(
            "The cause of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, Throwable)
 */
public void test_Constructor_LStringLThrowable_2() {
    Throwable cause = new Exception("MYTHROWABLE");
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            null, cause);
    assertNotNull(sQLTransientConnectionException);
    assertNull(
            "The reason of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getMessage());
    assertNull(
            "The SQLState of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getSQLState());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 0",
            sQLTransientConnectionException.getErrorCode(), 0);
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, Throwable)
 */
public void test_Constructor_LStringLThrowable_3() {
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            (String) null, (Throwable) null);
    assertNotNull(sQLTransientConnectionException);
    assertNull(
            "The SQLState of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getSQLState());
    assertNull(
            "The reason of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 0",
            sQLTransientConnectionException.getErrorCode(), 0);
    assertNull(
            "The cause of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, String, Throwable)
 */
public void test_Constructor_LStringLStringLThrowable() {
    Throwable cause = new Exception("MYTHROWABLE");
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            "MYTESTSTRING1", "MYTESTSTRING2", cause);
    assertNotNull(sQLTransientConnectionException);
    assertEquals(
            "The SQLState of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING2", sQLTransientConnectionException.getSQLState());
    assertEquals(
            "The reason of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING1", sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 0",
            sQLTransientConnectionException.getErrorCode(), 0);
    assertEquals(
            "The cause of SQLTransientConnectionException set and get should be equivalent",
            cause, sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, String, Throwable)
 */
public void test_Constructor_LStringLStringLThrowable_1() {
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            "MYTESTSTRING1", "MYTESTSTRING2", null);
    assertNotNull(sQLTransientConnectionException);
    assertEquals(
            "The SQLState of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING2", sQLTransientConnectionException.getSQLState());
    assertEquals(
            "The reason of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING1", sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 0",
            sQLTransientConnectionException.getErrorCode(), 0);
    assertNull(
            "The cause of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, String, Throwable)
 */
public void test_Constructor_LStringLStringLThrowable_2() {
    Throwable cause = new Exception("MYTHROWABLE");
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            "MYTESTSTRING", null, cause);
    assertNotNull(sQLTransientConnectionException);
    assertNull(
            "The SQLState of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getSQLState());
    assertEquals(
            "The reason of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING", sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 0",
            sQLTransientConnectionException.getErrorCode(), 0);
    assertEquals(
            "The cause of SQLTransientConnectionException set and get should be equivalent",
            cause, sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, String, Throwable)
 */
public void test_Constructor_LStringLStringLThrowable_3() {
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            "MYTESTSTRING", null, null);
    assertNotNull(sQLTransientConnectionException);
    assertNull(
            "The SQLState of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getSQLState());
    assertEquals(
            "The reason of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING", sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 0",
            sQLTransientConnectionException.getErrorCode(), 0);
    assertNull(
            "The cause of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, String, Throwable)
 */
public void test_Constructor_LStringLStringLThrowable_4() {
    Throwable cause = new Exception("MYTHROWABLE");
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            null, "MYTESTSTRING", cause);
    assertNotNull(sQLTransientConnectionException);
    assertEquals(
            "The SQLState of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING", sQLTransientConnectionException.getSQLState());
    assertNull(
            "The reason of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 0",
            sQLTransientConnectionException.getErrorCode(), 0);
    assertEquals(
            "The cause of SQLTransientConnectionException set and get should be equivalent",
            cause, sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, String, Throwable)
 */
public void test_Constructor_LStringLStringLThrowable_5() {
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            null, "MYTESTSTRING", null);
    assertNotNull(sQLTransientConnectionException);
    assertEquals(
            "The SQLState of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING", sQLTransientConnectionException.getSQLState());
    assertNull(
            "The reason of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 0",
            sQLTransientConnectionException.getErrorCode(), 0);
    assertNull(
            "The cause of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, String, Throwable)
 */
public void test_Constructor_LStringLStringLThrowable_6() {
    Throwable cause = new Exception("MYTHROWABLE");
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            null, null, cause);
    assertNotNull(sQLTransientConnectionException);
    assertNull(
            "The SQLState of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getSQLState());
    assertNull(
            "The reason of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 0",
            sQLTransientConnectionException.getErrorCode(), 0);
    assertEquals(
            "The cause of SQLTransientConnectionException set and get should be equivalent",
            cause, sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, String, Throwable)
 */
public void test_Constructor_LStringLStringLThrowable_7() {
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            null, null, null);
    assertNotNull(sQLTransientConnectionException);
    assertNull(
            "The SQLState of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getSQLState());
    assertNull(
            "The reason of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 0",
            sQLTransientConnectionException.getErrorCode(), 0);
    assertNull(
            "The cause of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, String, int,
 *       Throwable)
 */
public void test_Constructor_LStringLStringILThrowable() {
    Throwable cause = new Exception("MYTHROWABLE");
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            "MYTESTSTRING1", "MYTESTSTRING2", 1, cause);
    assertNotNull(sQLTransientConnectionException);
    assertEquals(
            "The SQLState of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING2", sQLTransientConnectionException.getSQLState());
    assertEquals(
            "The reason of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING1", sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 1",
            sQLTransientConnectionException.getErrorCode(), 1);
    assertEquals(
            "The cause of SQLTransientConnectionException set and get should be equivalent",
            cause, sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, String, int,
 *       Throwable)
 */
public void test_Constructor_LStringLStringILThrowable_1() {
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            "MYTESTSTRING1", "MYTESTSTRING2", 1, null);
    assertNotNull(sQLTransientConnectionException);
    assertEquals(
            "The SQLState of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING2", sQLTransientConnectionException.getSQLState());
    assertEquals(
            "The reason of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING1", sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 1",
            sQLTransientConnectionException.getErrorCode(), 1);
    assertNull(
            "The cause of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, String, int,
 *       Throwable)
 */
public void test_Constructor_LStringLStringILThrowable_2() {
    Throwable cause = new Exception("MYTHROWABLE");
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            "MYTESTSTRING1", "MYTESTSTRING2", 0, cause);
    assertNotNull(sQLTransientConnectionException);
    assertEquals(
            "The SQLState of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING2", sQLTransientConnectionException.getSQLState());
    assertEquals(
            "The reason of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING1", sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 0",
            sQLTransientConnectionException.getErrorCode(), 0);
    assertEquals(
            "The cause of SQLTransientConnectionException set and get should be equivalent",
            cause, sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, String, int,
 *       Throwable)
 */
public void test_Constructor_LStringLStringILThrowable_3() {
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            "MYTESTSTRING1", "MYTESTSTRING2", 0, null);
    assertNotNull(sQLTransientConnectionException);
    assertEquals(
            "The SQLState of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING2", sQLTransientConnectionException.getSQLState());
    assertEquals(
            "The reason of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING1", sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 0",
            sQLTransientConnectionException.getErrorCode(), 0);
    assertNull(
            "The cause of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, String, int,
 *       Throwable)
 */
public void test_Constructor_LStringLStringILThrowable_4() {
    Throwable cause = new Exception("MYTHROWABLE");
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            "MYTESTSTRING1", "MYTESTSTRING2", -1, cause);
    assertNotNull(sQLTransientConnectionException);
    assertEquals(
            "The SQLState of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING2", sQLTransientConnectionException.getSQLState());
    assertEquals(
            "The reason of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING1", sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be -1",
            sQLTransientConnectionException.getErrorCode(), -1);
    assertEquals(
            "The cause of SQLTransientConnectionException set and get should be equivalent",
            cause, sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, String, int,
 *       Throwable)
 */
public void test_Constructor_LStringLStringILThrowable_5() {
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            "MYTESTSTRING1", "MYTESTSTRING2", -1, null);
    assertNotNull(sQLTransientConnectionException);
    assertEquals(
            "The SQLState of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING2", sQLTransientConnectionException.getSQLState());
    assertEquals(
            "The reason of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING1", sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be -1",
            sQLTransientConnectionException.getErrorCode(), -1);
    assertNull(
            "The cause of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getCause());

}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, String, int,
 *       Throwable)
 */
public void test_Constructor_LStringLStringILThrowable_6() {
    Throwable cause = new Exception("MYTHROWABLE");
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            "MYTESTSTRING", null, 1, cause);
    assertNotNull(sQLTransientConnectionException);
    assertNull(
            "The SQLState of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getSQLState());
    assertEquals(
            "The reason of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING", sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 1",
            sQLTransientConnectionException.getErrorCode(), 1);
    assertEquals(
            "The cause of SQLTransientConnectionException set and get should be equivalent",
            cause, sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, String, int,
 *       Throwable)
 */
public void test_Constructor_LStringLStringILThrowable_7() {
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            "MYTESTSTRING", null, 1, null);
    assertNotNull(sQLTransientConnectionException);
    assertNotNull(sQLTransientConnectionException);
    assertNull(
            "The SQLState of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getSQLState());
    assertEquals(
            "The reason of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING", sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 1",
            sQLTransientConnectionException.getErrorCode(), 1);
    assertNull(
            "The cause of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, String, int,
 *       Throwable)
 */
public void test_Constructor_LStringLStringILThrowable_8() {
    Throwable cause = new Exception("MYTHROWABLE");
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            "MYTESTSTRING", null, 0, cause);
    assertNotNull(sQLTransientConnectionException);
    assertNull(
            "The SQLState of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getSQLState());
    assertEquals(
            "The reason of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING", sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 0",
            sQLTransientConnectionException.getErrorCode(), 0);
    assertEquals(
            "The cause of SQLTransientConnectionException set and get should be equivalent",
            cause, sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, String, int,
 *       Throwable)
 */
public void test_Constructor_LStringLStringILThrowable_9() {
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            "MYTESTSTRING", null, 0, null);
    assertNotNull(sQLTransientConnectionException);
    assertNull(
            "The SQLState of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getSQLState());
    assertEquals(
            "The reason of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING", sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 0",
            sQLTransientConnectionException.getErrorCode(), 0);
    assertNull(
            "The cause of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, String, int,
 *       Throwable)
 */
public void test_Constructor_LStringLStringILThrowable_10() {
    Throwable cause = new Exception("MYTHROWABLE");
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            "MYTESTSTRING", null, -1, cause);
    assertNotNull(sQLTransientConnectionException);
    assertNull(
            "The SQLState of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getSQLState());
    assertEquals(
            "The reason of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING", sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be -1",
            sQLTransientConnectionException.getErrorCode(), -1);
    assertEquals(
            "The cause of SQLTransientConnectionException set and get should be equivalent",
            cause, sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, String, int,
 *       Throwable)
 */
public void test_Constructor_LStringLStringILThrowable_11() {
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            "MYTESTSTRING", null, -1, null);
    assertNotNull(sQLTransientConnectionException);
    assertNull(
            "The SQLState of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getSQLState());
    assertEquals(
            "The reason of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING", sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be -1",
            sQLTransientConnectionException.getErrorCode(), -1);
    assertNull(
            "The cause of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, String, int,
 *       Throwable)
 */
public void test_Constructor_LStringLStringILThrowable_12() {
    Throwable cause = new Exception("MYTHROWABLE");
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            null, "MYTESTSTRING", 1, cause);
    assertNotNull(sQLTransientConnectionException);
    assertEquals(
            "The SQLState of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING", sQLTransientConnectionException.getSQLState());
    assertNull(
            "The reason of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 1",
            sQLTransientConnectionException.getErrorCode(), 1);
    assertEquals(
            "The cause of SQLTransientConnectionException set and get should be equivalent",
            cause, sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, String, int,
 *       Throwable)
 */
public void test_Constructor_LStringLStringILThrowable_13() {
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            null, "MYTESTSTRING", 1, null);
    assertNotNull(sQLTransientConnectionException);
    assertEquals(
            "The SQLState of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING", sQLTransientConnectionException.getSQLState());
    assertNull(
            "The reason of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 1",
            sQLTransientConnectionException.getErrorCode(), 1);
    assertNull(
            "The cause of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getCause());
}
项目:cn1    文件:SQLTransientConnectionExceptionTest.java   
/**
 * @test java.sql.SQLTransientConnectionException(String, String, int,
 *       Throwable)
 */
public void test_Constructor_LStringLStringILThrowable_14() {
    Throwable cause = new Exception("MYTHROWABLE");
    SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
            null, "MYTESTSTRING", 0, cause);
    assertNotNull(sQLTransientConnectionException);
    assertEquals(
            "The SQLState of SQLTransientConnectionException set and get should be equivalent",
            "MYTESTSTRING", sQLTransientConnectionException.getSQLState());
    assertNull(
            "The reason of SQLTransientConnectionException should be null",
            sQLTransientConnectionException.getMessage());
    assertEquals(
            "The error code of SQLTransientConnectionException should be 0",
            sQLTransientConnectionException.getErrorCode(), 0);
    assertEquals(
            "The cause of SQLTransientConnectionException set and get should be equivalent",
            cause, sQLTransientConnectionException.getCause());
}