本文整理汇总了Java中java.sql.SQLInvalidAuthorizationSpecException类的典型用法代码示例。如果您正苦于以下问题:Java SQLInvalidAuthorizationSpecException类的具体用法?Java SQLInvalidAuthorizationSpecException怎么用?Java SQLInvalidAuthorizationSpecException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SQLInvalidAuthorizationSpecException类属于java.sql包,在下文中一共展示了SQLInvalidAuthorizationSpecException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: test11
import java.sql.SQLInvalidAuthorizationSpecException; //导入依赖的package包/类
/**
* Validate that the ordering of the returned Exceptions is correct using
* for-each loop
*/
@Test
public void test11() {
SQLInvalidAuthorizationSpecException ex
= new SQLInvalidAuthorizationSpecException("Exception 1", t1);
SQLInvalidAuthorizationSpecException ex1
= new SQLInvalidAuthorizationSpecException("Exception 2");
SQLInvalidAuthorizationSpecException ex2
= new SQLInvalidAuthorizationSpecException("Exception 3", t2);
ex.setNextException(ex1);
ex.setNextException(ex2);
int num = 0;
for (Throwable e : ex) {
assertTrue(msgs[num++].equals(e.getMessage()));
}
}
示例2: test12
import java.sql.SQLInvalidAuthorizationSpecException; //导入依赖的package包/类
/**
* Validate that the ordering of the returned Exceptions is correct using
* traditional while loop
*/
@Test
public void test12() {
SQLInvalidAuthorizationSpecException ex
= new SQLInvalidAuthorizationSpecException("Exception 1", t1);
SQLInvalidAuthorizationSpecException ex1
= new SQLInvalidAuthorizationSpecException("Exception 2");
SQLInvalidAuthorizationSpecException ex2
= new SQLInvalidAuthorizationSpecException("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();
}
}
示例3: test_Constructor_LString
import java.sql.SQLInvalidAuthorizationSpecException; //导入依赖的package包/类
/**
* @test java.sql.SQLInvalidAuthorizationSpecException(String)
*/
public void test_Constructor_LString() {
SQLInvalidAuthorizationSpecException sQLInvalidAuthorizationSpecException = new SQLInvalidAuthorizationSpecException(
"MYTESTSTRING");
assertNotNull(sQLInvalidAuthorizationSpecException);
assertNull(
"The SQLState of SQLInvalidAuthorizationSpecException should be null",
sQLInvalidAuthorizationSpecException.getSQLState());
assertEquals(
"The reason of SQLInvalidAuthorizationSpecException set and get should be equivalent",
"MYTESTSTRING", sQLInvalidAuthorizationSpecException
.getMessage());
assertEquals(
"The error code of SQLInvalidAuthorizationSpecException should be 0",
sQLInvalidAuthorizationSpecException.getErrorCode(), 0);
}
示例4: test_Constructor_LStringLString
import java.sql.SQLInvalidAuthorizationSpecException; //导入依赖的package包/类
/**
* @test java.sql.SQLInvalidAuthorizationSpecException(String, String)
*/
public void test_Constructor_LStringLString() {
SQLInvalidAuthorizationSpecException sQLInvalidAuthorizationSpecException = new SQLInvalidAuthorizationSpecException(
"MYTESTSTRING1", "MYTESTSTRING2");
assertNotNull(sQLInvalidAuthorizationSpecException);
assertEquals(
"The SQLState of SQLInvalidAuthorizationSpecException set and get should be equivalent",
"MYTESTSTRING2", sQLInvalidAuthorizationSpecException
.getSQLState());
assertEquals(
"The reason of SQLInvalidAuthorizationSpecException set and get should be equivalent",
"MYTESTSTRING1", sQLInvalidAuthorizationSpecException
.getMessage());
assertEquals(
"The error code of SQLInvalidAuthorizationSpecException should be 0",
sQLInvalidAuthorizationSpecException.getErrorCode(), 0);
}
示例5: test_Constructor_LStringLString_1
import java.sql.SQLInvalidAuthorizationSpecException; //导入依赖的package包/类
/**
* @test java.sql.SQLInvalidAuthorizationSpecException(String, String)
*/
public void test_Constructor_LStringLString_1() {
SQLInvalidAuthorizationSpecException sQLInvalidAuthorizationSpecException = new SQLInvalidAuthorizationSpecException(
"MYTESTSTRING", (String) null);
assertNotNull(sQLInvalidAuthorizationSpecException);
assertNull(
"The SQLState of SQLInvalidAuthorizationSpecException should be null",
sQLInvalidAuthorizationSpecException.getSQLState());
assertEquals(
"The reason of SQLInvalidAuthorizationSpecException set and get should be equivalent",
"MYTESTSTRING", sQLInvalidAuthorizationSpecException
.getMessage());
assertEquals(
"The error code of SQLInvalidAuthorizationSpecException should be 0",
sQLInvalidAuthorizationSpecException.getErrorCode(), 0);
}
示例6: test_Constructor_LStringLString_2
import java.sql.SQLInvalidAuthorizationSpecException; //导入依赖的package包/类
/**
* @test java.sql.SQLInvalidAuthorizationSpecException(String, String)
*/
public void test_Constructor_LStringLString_2() {
SQLInvalidAuthorizationSpecException sQLInvalidAuthorizationSpecException = new SQLInvalidAuthorizationSpecException(
null, "MYTESTSTRING");
assertNotNull(sQLInvalidAuthorizationSpecException);
assertEquals(
"The SQLState of SQLInvalidAuthorizationSpecException set and get should be equivalent",
"MYTESTSTRING", sQLInvalidAuthorizationSpecException
.getSQLState());
assertNull(
"The reason of SQLInvalidAuthorizationSpecException should be null",
sQLInvalidAuthorizationSpecException.getMessage());
assertEquals(
"The error code of SQLInvalidAuthorizationSpecException should be 0",
sQLInvalidAuthorizationSpecException.getErrorCode(), 0);
}
示例7: test_Constructor_LStringLStringI
import java.sql.SQLInvalidAuthorizationSpecException; //导入依赖的package包/类
/**
* @test java.sql.SQLInvalidAuthorizationSpecException(String, String, int)
*/
public void test_Constructor_LStringLStringI() {
SQLInvalidAuthorizationSpecException sQLInvalidAuthorizationSpecException = new SQLInvalidAuthorizationSpecException(
"MYTESTSTRING1", "MYTESTSTRING2", 1);
assertNotNull(sQLInvalidAuthorizationSpecException);
assertEquals(
"The SQLState of SQLInvalidAuthorizationSpecException set and get should be equivalent",
"MYTESTSTRING2", sQLInvalidAuthorizationSpecException
.getSQLState());
assertEquals(
"The reason of SQLInvalidAuthorizationSpecException set and get should be equivalent",
"MYTESTSTRING1", sQLInvalidAuthorizationSpecException
.getMessage());
assertEquals(
"The error code of SQLInvalidAuthorizationSpecException should be 1",
sQLInvalidAuthorizationSpecException.getErrorCode(), 1);
}
示例8: test_Constructor_LStringLStringI_1
import java.sql.SQLInvalidAuthorizationSpecException; //导入依赖的package包/类
/**
* @test java.sql.SQLInvalidAuthorizationSpecException(String, String, int)
*/
public void test_Constructor_LStringLStringI_1() {
SQLInvalidAuthorizationSpecException sQLInvalidAuthorizationSpecException = new SQLInvalidAuthorizationSpecException(
"MYTESTSTRING1", "MYTESTSTRING2", 0);
assertNotNull(sQLInvalidAuthorizationSpecException);
assertEquals(
"The SQLState of SQLInvalidAuthorizationSpecException set and get should be equivalent",
"MYTESTSTRING2", sQLInvalidAuthorizationSpecException
.getSQLState());
assertEquals(
"The reason of SQLInvalidAuthorizationSpecException set and get should be equivalent",
"MYTESTSTRING1", sQLInvalidAuthorizationSpecException
.getMessage());
assertEquals(
"The error code of SQLInvalidAuthorizationSpecException should be 0",
sQLInvalidAuthorizationSpecException.getErrorCode(), 0);
}
示例9: test_Constructor_LStringLStringI_2
import java.sql.SQLInvalidAuthorizationSpecException; //导入依赖的package包/类
/**
* @test java.sql.SQLInvalidAuthorizationSpecException(String, String, int)
*/
public void test_Constructor_LStringLStringI_2() {
SQLInvalidAuthorizationSpecException sQLInvalidAuthorizationSpecException = new SQLInvalidAuthorizationSpecException(
"MYTESTSTRING1", "MYTESTSTRING2", -1);
assertNotNull(sQLInvalidAuthorizationSpecException);
assertEquals(
"The SQLState of SQLInvalidAuthorizationSpecException set and get should be equivalent",
"MYTESTSTRING2", sQLInvalidAuthorizationSpecException
.getSQLState());
assertEquals(
"The reason of SQLInvalidAuthorizationSpecException set and get should be equivalent",
"MYTESTSTRING1", sQLInvalidAuthorizationSpecException
.getMessage());
assertEquals(
"The error code of SQLInvalidAuthorizationSpecException should be -1",
sQLInvalidAuthorizationSpecException.getErrorCode(), -1);
}
示例10: test_Constructor_LStringLStringI_3
import java.sql.SQLInvalidAuthorizationSpecException; //导入依赖的package包/类
/**
* @test java.sql.SQLInvalidAuthorizationSpecException(String, String, int)
*/
public void test_Constructor_LStringLStringI_3() {
SQLInvalidAuthorizationSpecException sQLInvalidAuthorizationSpecException = new SQLInvalidAuthorizationSpecException(
"MYTESTSTRING", null, 1);
assertNotNull(sQLInvalidAuthorizationSpecException);
assertNull(
"The SQLState of SQLInvalidAuthorizationSpecException should be null",
sQLInvalidAuthorizationSpecException.getSQLState());
assertEquals(
"The reason of SQLInvalidAuthorizationSpecException set and get should be equivalent",
"MYTESTSTRING", sQLInvalidAuthorizationSpecException
.getMessage());
assertEquals(
"The error code of SQLInvalidAuthorizationSpecException should be 1",
sQLInvalidAuthorizationSpecException.getErrorCode(), 1);
}
示例11: test_Constructor_LStringLStringI_4
import java.sql.SQLInvalidAuthorizationSpecException; //导入依赖的package包/类
/**
* @test java.sql.SQLInvalidAuthorizationSpecException(String, String, int)
*/
public void test_Constructor_LStringLStringI_4() {
SQLInvalidAuthorizationSpecException sQLInvalidAuthorizationSpecException = new SQLInvalidAuthorizationSpecException(
"MYTESTSTRING", null, 0);
assertNotNull(sQLInvalidAuthorizationSpecException);
assertNull(
"The SQLState of SQLInvalidAuthorizationSpecException should be null",
sQLInvalidAuthorizationSpecException.getSQLState());
assertEquals(
"The reason of SQLInvalidAuthorizationSpecException set and get should be equivalent",
"MYTESTSTRING", sQLInvalidAuthorizationSpecException
.getMessage());
assertEquals(
"The error code of SQLInvalidAuthorizationSpecException should be 0",
sQLInvalidAuthorizationSpecException.getErrorCode(), 0);
}
示例12: test_Constructor_LStringLStringI_5
import java.sql.SQLInvalidAuthorizationSpecException; //导入依赖的package包/类
/**
* @test java.sql.SQLInvalidAuthorizationSpecException(String, String, int)
*/
public void test_Constructor_LStringLStringI_5() {
SQLInvalidAuthorizationSpecException sQLInvalidAuthorizationSpecException = new SQLInvalidAuthorizationSpecException(
"MYTESTSTRING", null, -1);
assertNotNull(sQLInvalidAuthorizationSpecException);
assertNull(
"The SQLState of SQLInvalidAuthorizationSpecException should be null",
sQLInvalidAuthorizationSpecException.getSQLState());
assertEquals(
"The reason of SQLInvalidAuthorizationSpecException set and get should be equivalent",
"MYTESTSTRING", sQLInvalidAuthorizationSpecException
.getMessage());
assertEquals(
"The error code of SQLInvalidAuthorizationSpecException should be -1",
sQLInvalidAuthorizationSpecException.getErrorCode(), -1);
}
示例13: test_Constructor_LStringLStringI_6
import java.sql.SQLInvalidAuthorizationSpecException; //导入依赖的package包/类
/**
* @test java.sql.SQLInvalidAuthorizationSpecException(String, String, int)
*/
public void test_Constructor_LStringLStringI_6() {
SQLInvalidAuthorizationSpecException sQLInvalidAuthorizationSpecException = new SQLInvalidAuthorizationSpecException(
null, "MYTESTSTRING", 1);
assertNotNull(sQLInvalidAuthorizationSpecException);
assertEquals(
"The SQLState of SQLInvalidAuthorizationSpecException set and get should be equivalent",
"MYTESTSTRING", sQLInvalidAuthorizationSpecException
.getSQLState());
assertNull(
"The reason of SQLInvalidAuthorizationSpecException should be null",
sQLInvalidAuthorizationSpecException.getMessage());
assertEquals(
"The error code of SQLInvalidAuthorizationSpecException should be 1",
sQLInvalidAuthorizationSpecException.getErrorCode(), 1);
}
示例14: test_Constructor_LStringLStringI_7
import java.sql.SQLInvalidAuthorizationSpecException; //导入依赖的package包/类
/**
* @test java.sql.SQLInvalidAuthorizationSpecException(String, String, int)
*/
public void test_Constructor_LStringLStringI_7() {
SQLInvalidAuthorizationSpecException sQLInvalidAuthorizationSpecException = new SQLInvalidAuthorizationSpecException(
null, "MYTESTSTRING", 0);
assertNotNull(sQLInvalidAuthorizationSpecException);
assertEquals(
"The SQLState of SQLInvalidAuthorizationSpecException set and get should be equivalent",
"MYTESTSTRING", sQLInvalidAuthorizationSpecException
.getSQLState());
assertNull(
"The reason of SQLInvalidAuthorizationSpecException should be null",
sQLInvalidAuthorizationSpecException.getMessage());
assertEquals(
"The error code of SQLInvalidAuthorizationSpecException should be 0",
sQLInvalidAuthorizationSpecException.getErrorCode(), 0);
}
示例15: test_Constructor_LStringLStringI_8
import java.sql.SQLInvalidAuthorizationSpecException; //导入依赖的package包/类
/**
* @test java.sql.SQLInvalidAuthorizationSpecException(String, String, int)
*/
public void test_Constructor_LStringLStringI_8() {
SQLInvalidAuthorizationSpecException sQLInvalidAuthorizationSpecException = new SQLInvalidAuthorizationSpecException(
null, "MYTESTSTRING", -1);
assertNotNull(sQLInvalidAuthorizationSpecException);
assertEquals(
"The SQLState of SQLInvalidAuthorizationSpecException set and get should be equivalent",
"MYTESTSTRING", sQLInvalidAuthorizationSpecException
.getSQLState());
assertNull(
"The reason of SQLInvalidAuthorizationSpecException should be null",
sQLInvalidAuthorizationSpecException.getMessage());
assertEquals(
"The error code of SQLInvalidAuthorizationSpecException should be -1",
sQLInvalidAuthorizationSpecException.getErrorCode(), -1);
}