@Test public void test04() { SQLException ex = new SerialException("Exception 1"); ex.initCause(t1); SerialException ex1 = new SerialException("Exception 2"); SerialException ex2 = new SerialException("Exception 3"); ex2.initCause(t2); ex.setNextException(ex1); ex.setNextException(ex2); int num = 0; while (ex != null) { assertTrue(msgs[num++].equals(ex.getMessage())); Throwable c = ex.getCause(); while (c != null) { assertTrue(msgs[num++].equals(c.getMessage())); c = c.getCause(); } ex = ex.getNextException(); } }
@Test public void test01() { SerialException ex = new SerialException(); assertTrue(ex.getMessage() == null && ex.getSQLState() == null && ex.getCause() == null && ex.getErrorCode() == 0); }
@Test public void test03() { SerialException ex = new SerialException("Exception 1"); ex.initCause(t1); SerialException ex1 = new SerialException("Exception 2"); SerialException ex2 = new SerialException("Exception 3"); ex2.initCause(t2); ex.setNextException(ex1); ex.setNextException(ex2); int num = 0; for (Throwable e : ex) { assertTrue(msgs[num++].equals(e.getMessage())); } }
@Test public void test05() throws Exception { SerialException e = new SerialException(reason); SerialException ex1 = createSerializedException(e); assertTrue(ex1.getMessage().equals(reason) && ex1.getSQLState() == null && ex1.getCause() == null && ex1.getErrorCode() == 0);; }
@Test public void test02() throws Exception { SerialException e = new SerialException(); SerialJavaObject sjo = new SerialJavaObject(e); Field[] f = e.getClass().getFields(); assertTrue(Arrays.equals(f, sjo.getFields())); assertFalse(Arrays.equals("hello".getClass().getFields(), sjo.getFields())); }
@Test(expectedExceptions = SerialException.class) public void test19() throws Exception { SerialBlob sb = new SerialBlob(bytes); sb.free(); SerialBlob sb2 = (SerialBlob) sb.clone(); InputStream is = sb2.getBinaryStream(1, 3); }
public static void main(String[] args) throws Exception { SerialClob clob = new SerialClob(new char[0]); try { clob.setCharacterStream(0); } catch (SerialException e) { System.out.println("Test PASSED"); } }
public static void main(String[] args) throws Exception { SerialClob clob = new SerialClob(new char[0]); try { clob.setAsciiStream(0); } catch (SerialException e) { System.out.println("Test PASSED"); } }
public static void main(String[] args) throws Exception { SerialBlob blob = new SerialBlob(new byte[0]); try { blob.setBinaryStream(0); } catch (SerialException e) { System.out.println("Test PASSED"); } }
@Test public void test02() { SerialException ex = new SerialException(reason); assertTrue(ex.getMessage().equals(reason) && ex.getSQLState() == null && ex.getCause() == null && ex.getErrorCode() == 0); }
@Test(expectedExceptions = SerialException.class) public void test03() throws Exception { SerialArray sa = new SerialArray(a); sa.getResultSet(); }
@Test(expectedExceptions = SerialException.class) public void test21() throws Exception { SerialBlob sb = new SerialBlob(bytes); sb.setBinaryStream(3); }
@Test(expectedExceptions = SerialException.class) public void test05() throws Exception { SerialArray sa = new SerialArray(a); sa.getResultSet(1, 1); }
@Test(expectedExceptions = SerialException.class) public void test09() throws Exception { SerialBlob sb = new SerialBlob(new StubBlob()); sb.free(); sb.setBytes(1, new byte[10], 0, 5); }
@Test(expectedExceptions = SerialException.class) public void test07() throws Exception { SerialArray sa = new SerialArray(a); sa.free(); sa.getArray(); }
@Test(expectedExceptions = SerialException.class) public void test08() throws Exception { SerialArray sa = new SerialArray(a); sa.free(); sa.getArray(map); }
@Test(expectedExceptions = SerialException.class) public void test09() throws Exception { SerialArray sa = new SerialArray(a); sa.free(); sa.getArray(1, 1, map); }
@Test(expectedExceptions = SerialException.class) public void test10() throws Exception { SerialArray sa = new SerialArray(a); sa.free(); sa.getArray(1, 1); }
@Test(expectedExceptions = SerialException.class) public void test11() throws Exception { SerialArray sa = new SerialArray(a); sa.free(); sa.getBaseType(); }
@Test(expectedExceptions = SerialException.class) public void test12() throws Exception { SerialArray sa = new SerialArray(a); sa.free(); sa.getBaseTypeName(); }
@Test(expectedExceptions = SerialException.class) public void test() throws Exception { SerialDatalink dl1 = new SerialDatalink(null); }
@Test(expectedExceptions = SerialException.class) public void test01() throws Exception { SerialClob sc = new SerialClob(new StubClob()); sc.free(); sc.getCharacterStream(); }
@Test(expectedExceptions = SerialException.class) public void test02() throws Exception { SerialClob sc = new SerialClob(chars); sc.free(); sc.getCharacterStream(); }
@Test(expectedExceptions = SerialException.class) public void test15() throws Exception { SerialBlob sb = new SerialBlob(bytes); InputStream is = sb.getBinaryStream(1, 0); }
@Test(expectedExceptions = SerialException.class) public void test04() throws Exception { SerialClob sc = new SerialClob(new StubClob()); sc.free(); sc.getSubString(1, 1); }
@Test(expectedExceptions = SerialException.class) public void test05() throws Exception { SerialClob sc = new SerialClob(new StubClob()); sc.free(); sc.truncate(1); }
@Test(expectedExceptions = SerialException.class) public void test06() throws Exception { SerialClob sc = new SerialClob(new StubClob()); sc.free(); sc.getAsciiStream(); }
@Test(expectedExceptions = SerialException.class) public void test07() throws Exception { SerialClob sc = new SerialClob(new StubClob()); sc.free(); sc.length(); }
@Test(expectedExceptions = SerialException.class) public void test08() throws Exception { SerialClob sc = new SerialClob(new StubClob()); sc.free(); sc.position("hello", 1); }
@Test(expectedExceptions = SerialException.class) public void test09() throws Exception { SerialClob sc = new SerialClob(new StubClob()); sc.free(); sc.position(new StubClob(), 1); }
@Test(expectedExceptions = SerialException.class) public void test10() throws Exception { SerialClob sc = new SerialClob(new StubClob()); sc.free(); sc.setAsciiStream(5); }
@Test(expectedExceptions = SerialException.class) public void test11() throws Exception { SerialClob sc = new SerialClob(new StubClob()); sc.free(); sc.setCharacterStream(5); }
@Test(expectedExceptions = SerialException.class) public void test12() throws Exception { SerialClob sc = new SerialClob(new StubClob()); sc.free(); sc.setString(1, "hello"); }
@Test(expectedExceptions = SerialException.class) public void test13() throws Exception { SerialClob sc = new SerialClob(new StubClob()); sc.free(); sc.setString(1, "hello", 0, 5); }
@Test(expectedExceptions = SerialException.class) public void test14() throws Exception { SerialClob sc = new SerialClob(chars); sc.getCharacterStream(-1, 5); }