/**
* @test java.sql.SQLIntegrityConstraintViolationException(Throwable)
*/
public void test_Constructor_LThrowable() {
Throwable cause = new Exception("MYTHROWABLE");
SQLIntegrityConstraintViolationException sQLIntegrityConstraintViolationException = new SQLIntegrityConstraintViolationException(
cause);
assertNotNull(sQLIntegrityConstraintViolationException);
assertEquals(
"The reason of SQLIntegrityConstraintViolationException should be equals to cause.toString()",
"java.lang.Exception: MYTHROWABLE",
sQLIntegrityConstraintViolationException.getMessage());
assertNull(
"The SQLState of SQLIntegrityConstraintViolationException should be null",
sQLIntegrityConstraintViolationException.getSQLState());
assertEquals(
"The error code of SQLIntegrityConstraintViolationException should be 0",
sQLIntegrityConstraintViolationException.getErrorCode(), 0);
assertEquals(
"The cause of SQLIntegrityConstraintViolationException set and get should be equivalent",
cause, sQLIntegrityConstraintViolationException.getCause());
}