* @test java.sql.SQLIntegrityConstraintViolationException(String, String,
* int, Throwable)
*/
public void test_Constructor_LStringLStringILThrowable_4() {
Throwable cause = new Exception("MYTHROWABLE");
SQLIntegrityConstraintViolationException sQLIntegrityConstraintViolationException = new SQLIntegrityConstraintViolationException(
"MYTESTSTRING1", "MYTESTSTRING2", -1, cause);
assertNotNull(sQLIntegrityConstraintViolationException);
assertEquals(
"The SQLState of SQLIntegrityConstraintViolationException set and get should be equivalent",
"MYTESTSTRING2", sQLIntegrityConstraintViolationException
.getSQLState());
assertEquals(
"The reason of SQLIntegrityConstraintViolationException set and get should be equivalent",
"MYTESTSTRING1", sQLIntegrityConstraintViolationException
.getMessage());
assertEquals(
"The error code of SQLIntegrityConstraintViolationException should be -1",
sQLIntegrityConstraintViolationException.getErrorCode(), -1);
assertEquals(
"The cause of SQLIntegrityConstraintViolationException set and get should be equivalent",
cause, sQLIntegrityConstraintViolationException.getCause());
}