当前位置: 首页>>代码示例>>Java>>正文


Java SQLInvalidAuthorizationSpecException类代码示例

本文整理汇总了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()));
    }
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:20,代码来源:SQLInvalidAuthorizationSpecExceptionTests.java

示例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();
    }
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:27,代码来源:SQLInvalidAuthorizationSpecExceptionTests.java

示例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);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:19,代码来源:SQLInvalidAuthorizationSpecExceptionTest.java

示例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);

}
 
开发者ID:shannah,项目名称:cn1,代码行数:21,代码来源:SQLInvalidAuthorizationSpecExceptionTest.java

示例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);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:19,代码来源:SQLInvalidAuthorizationSpecExceptionTest.java

示例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);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:19,代码来源:SQLInvalidAuthorizationSpecExceptionTest.java

示例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);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:20,代码来源:SQLInvalidAuthorizationSpecExceptionTest.java

示例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);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:20,代码来源:SQLInvalidAuthorizationSpecExceptionTest.java

示例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);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:20,代码来源:SQLInvalidAuthorizationSpecExceptionTest.java

示例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);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:19,代码来源:SQLInvalidAuthorizationSpecExceptionTest.java

示例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);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:19,代码来源:SQLInvalidAuthorizationSpecExceptionTest.java

示例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);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:19,代码来源:SQLInvalidAuthorizationSpecExceptionTest.java

示例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);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:19,代码来源:SQLInvalidAuthorizationSpecExceptionTest.java

示例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);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:19,代码来源:SQLInvalidAuthorizationSpecExceptionTest.java

示例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);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:19,代码来源:SQLInvalidAuthorizationSpecExceptionTest.java


注:本文中的java.sql.SQLInvalidAuthorizationSpecException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。