Code example for SQLNonTransientException

Methods: getCausegetMessagegetErrorCodegetSQLState

0
 
    /** 
     * @test java.sql.SQLNonTransientException(String, String, int, Throwable) 
     */ 
    public void test_Constructor_LStringLStringILThrowable_17() { 
        SQLNonTransientException sQLNonTransientException = new SQLNonTransientException(
                null, "MYTESTSTRING", -1, null); 
        assertNotNull(sQLNonTransientException);
        assertEquals(
                "The SQLState of SQLNonTransientException set and get should be equivalent", 
                "MYTESTSTRING", sQLNonTransientException.getSQLState());
        assertNull("The reason of SQLNonTransientException should be null",
                sQLNonTransientException.getMessage());
        assertEquals("The error code of SQLNonTransientException should be -1",
                sQLNonTransientException.getErrorCode(), -1);
        assertNull("The cause of SQLNonTransientException should be null",
                sQLNonTransientException.getCause());
    } 
 
    /** 
     * @test java.sql.SQLNonTransientException(String, String, int, Throwable) 
     */ 
Contextual code suggestions in your IDE  Get Codota for Java