/**
* 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()));
}
}
/**
* Validate that the ordering of the returned Exceptions is correct
* using Traditional while loop
*/
@Test
public void test12() {
sqlTransientConnectionException ex =
new sqlTransientConnectionException("Exception 1",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();
}
}
/**
* Validate that the ordering of the returned Exceptions is correct
* using for-each loop
*/
@Test
public void test11() {
sqlTransientConnectionException ex =
new sqlTransientConnectionException("Exception 1",t2);
ex.setNextException(ex1);
ex.setNextException(ex2);
int num = 0;
for (Throwable e : ex) {
assertTrue(msgs[num++].equals(e.getMessage()));
}
}
/**
* Validate that the ordering of the returned Exceptions is correct
* using Traditional while loop
*/
@Test
public void test12() {
sqlTransientConnectionException ex =
new sqlTransientConnectionException("Exception 1",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();
}
}
/**
* Validate that the ordering of the returned Exceptions is correct
* using for-each loop
*/
@Test
public void test11() {
sqlTransientConnectionException ex =
new sqlTransientConnectionException("Exception 1",t2);
ex.setNextException(ex1);
ex.setNextException(ex2);
int num = 0;
for (Throwable e : ex) {
assertTrue(msgs[num++].equals(e.getMessage()));
}
}
/**
* Validate that the ordering of the returned Exceptions is correct
* using Traditional while loop
*/
@Test
public void test12() {
sqlTransientConnectionException ex =
new sqlTransientConnectionException("Exception 1",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();
}
}
/**
* Validate that the ordering of the returned Exceptions is correct
* using for-each loop
*/
@Test
public void test11() {
sqlTransientConnectionException ex =
new sqlTransientConnectionException("Exception 1",t2);
ex.setNextException(ex1);
ex.setNextException(ex2);
int num = 0;
for (Throwable e : ex) {
assertTrue(msgs[num++].equals(e.getMessage()));
}
}
/**
* Validate that the ordering of the returned Exceptions is correct
* using Traditional while loop
*/
@Test
public void test12() {
sqlTransientConnectionException ex =
new sqlTransientConnectionException("Exception 1",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();
}
}
/**
* Validate that the ordering of the returned Exceptions is correct
* using for-each loop
*/
@Test
public void test11() {
sqlTransientConnectionException ex =
new sqlTransientConnectionException("Exception 1",t2);
ex.setNextException(ex1);
ex.setNextException(ex2);
int num = 0;
for (Throwable e : ex) {
assertTrue(msgs[num++].equals(e.getMessage()));
}
}
/**
* Validate that the ordering of the returned Exceptions is correct
* using Traditional while loop
*/
@Test
public void test12() {
sqlTransientConnectionException ex =
new sqlTransientConnectionException("Exception 1",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();
}
}
/**
* @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);
}
/**
* @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",0);
assertEquals(
"The cause of sqlTransientConnectionException set and get should be equivalent",cause,sqlTransientConnectionException.getCause());
}
/**
* @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",0);
assertNull(
"The cause of sqlTransientConnectionException should be null",sqlTransientConnectionException.getCause());
}
/**
* @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",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",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",0);
}
/**
* @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",String,Throwable)
*/
public void test_Constructor_LStringLStringLThrowable() {
Throwable cause = new Exception("MYTHROWABLE");
sqlTransientConnectionException sqlTransientConnectionException = new sqlTransientConnectionException(
"MYTESTSTRING1",cause);
assertNotNull(sqlTransientConnectionException);
assertEquals(
"The sqlState of sqlTransientConnectionException set and get should be equivalent",Throwable)
*/
public void test_Constructor_LStringLStringLThrowable_1() {
sqlTransientConnectionException sqlTransientConnectionException = new sqlTransientConnectionException(
"MYTESTSTRING1",null);
assertNotNull(sqlTransientConnectionException);
assertEquals(
"The sqlState of sqlTransientConnectionException set and get should be equivalent",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",Throwable)
*/
public void test_Constructor_LStringLStringLThrowable_3() {
sqlTransientConnectionException sqlTransientConnectionException = new sqlTransientConnectionException(
"MYTESTSTRING",null);
assertNotNull(sqlTransientConnectionException);
assertNull(
"The sqlState of sqlTransientConnectionException should be null",Throwable)
*/
public void test_Constructor_LStringLStringLThrowable_4() {
Throwable cause = new Exception("MYTHROWABLE");
sqlTransientConnectionException sqlTransientConnectionException = new sqlTransientConnectionException(
null,Throwable)
*/
public void test_Constructor_LStringLStringLThrowable_5() {
sqlTransientConnectionException sqlTransientConnectionException = new sqlTransientConnectionException(
null,Throwable)
*/
public void test_Constructor_LStringLStringLThrowable_6() {
Throwable cause = new Exception("MYTHROWABLE");
sqlTransientConnectionException sqlTransientConnectionException = new sqlTransientConnectionException(
null,Throwable)
*/
public void test_Constructor_LStringLStringLThrowable_7() {
sqlTransientConnectionException sqlTransientConnectionException = new sqlTransientConnectionException(
null,int,* Throwable)
*/
public void test_Constructor_LStringLStringILThrowable() {
Throwable cause = new Exception("MYTHROWABLE");
sqlTransientConnectionException sqlTransientConnectionException = new sqlTransientConnectionException(
"MYTESTSTRING1",1,sqlTransientConnectionException.getMessage());
assertEquals(
"The error code of sqlTransientConnectionException should be 1",1);
assertEquals(
"The cause of sqlTransientConnectionException set and get should be equivalent",* Throwable)
*/
public void test_Constructor_LStringLStringILThrowable_1() {
sqlTransientConnectionException sqlTransientConnectionException = new sqlTransientConnectionException(
"MYTESTSTRING1",1);
assertNull(
"The cause of sqlTransientConnectionException should be null",* Throwable)
*/
public void test_Constructor_LStringLStringILThrowable_2() {
Throwable cause = new Exception("MYTHROWABLE");
sqlTransientConnectionException sqlTransientConnectionException = new sqlTransientConnectionException(
"MYTESTSTRING1",* Throwable)
*/
public void test_Constructor_LStringLStringILThrowable_3() {
sqlTransientConnectionException sqlTransientConnectionException = new sqlTransientConnectionException(
"MYTESTSTRING1",* Throwable)
*/
public void test_Constructor_LStringLStringILThrowable_4() {
Throwable cause = new Exception("MYTHROWABLE");
sqlTransientConnectionException sqlTransientConnectionException = new sqlTransientConnectionException(
"MYTESTSTRING1",-1,sqlTransientConnectionException.getMessage());
assertEquals(
"The error code of sqlTransientConnectionException should be -1",-1);
assertEquals(
"The cause of sqlTransientConnectionException set and get should be equivalent",* Throwable)
*/
public void test_Constructor_LStringLStringILThrowable_5() {
sqlTransientConnectionException sqlTransientConnectionException = new sqlTransientConnectionException(
"MYTESTSTRING1",-1);
assertNull(
"The cause of sqlTransientConnectionException should be null",sqlTransientConnectionException.getCause());
}
/**
* @test java.sql.sqlTransientConnectionException(String,* Throwable)
*/
public void test_Constructor_LStringLStringILThrowable_6() {
Throwable cause = new Exception("MYTHROWABLE");
sqlTransientConnectionException sqlTransientConnectionException = new sqlTransientConnectionException(
"MYTESTSTRING",* Throwable)
*/
public void test_Constructor_LStringLStringILThrowable_7() {
sqlTransientConnectionException sqlTransientConnectionException = new sqlTransientConnectionException(
"MYTESTSTRING",null);
assertNotNull(sqlTransientConnectionException);
assertNotNull(sqlTransientConnectionException);
assertNull(
"The sqlState of sqlTransientConnectionException should be null",* Throwable)
*/
public void test_Constructor_LStringLStringILThrowable_8() {
Throwable cause = new Exception("MYTHROWABLE");
sqlTransientConnectionException sqlTransientConnectionException = new sqlTransientConnectionException(
"MYTESTSTRING",* Throwable)
*/
public void test_Constructor_LStringLStringILThrowable_9() {
sqlTransientConnectionException sqlTransientConnectionException = new sqlTransientConnectionException(
"MYTESTSTRING",* Throwable)
*/
public void test_Constructor_LStringLStringILThrowable_10() {
Throwable cause = new Exception("MYTHROWABLE");
sqlTransientConnectionException sqlTransientConnectionException = new sqlTransientConnectionException(
"MYTESTSTRING",* Throwable)
*/
public void test_Constructor_LStringLStringILThrowable_11() {
sqlTransientConnectionException sqlTransientConnectionException = new sqlTransientConnectionException(
"MYTESTSTRING",* Throwable)
*/
public void test_Constructor_LStringLStringILThrowable_12() {
Throwable cause = new Exception("MYTHROWABLE");
sqlTransientConnectionException sqlTransientConnectionException = new sqlTransientConnectionException(
null,* Throwable)
*/
public void test_Constructor_LStringLStringILThrowable_13() {
sqlTransientConnectionException sqlTransientConnectionException = new sqlTransientConnectionException(
null,* Throwable)
*/
public void test_Constructor_LStringLStringILThrowable_14() {
Throwable cause = new Exception("MYTHROWABLE");
sqlTransientConnectionException sqlTransientConnectionException = new sqlTransientConnectionException(
null,sqlTransientConnectionException.getCause());
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。