Example #1
0
  @Test
  public void testConvertClobString() throws Exception {
    testConvertClobPrepare();

    TypeHandlerUtils.convertClob(clob, "TIFF");

    testConvertClobCheck();
  }
Example #2
0
  @Test
  public void testConvertClobInputStream() throws Exception {
    testConvertClobPrepare();

    TypeHandlerUtils.convertClob(clob, new ByteArrayInputStream("PNG".getBytes()));

    testConvertClobCheck();
  }
Example #3
0
  @Test
  public void testConvertClobByte() throws Exception {
    testConvertClobPrepare();

    TypeHandlerUtils.convertClob(clob, "JPEG".getBytes());

    testConvertClobCheck();
  }
Example #4
0
  @Test
  public void testConvertClobConnString() throws Exception {
    testConvertClobPrepare();

    TypeHandlerUtils.convertClob(conn, "PCX");

    // verify(conn, times(1)).createClob();
    MappingUtils.invokeFunction(
        verify(conn, times(1)), "createClob", new Class[] {}, new Object[] {});
    testConvertClobCheck();
  }
Example #5
0
  @Test
  public void testConvertClobConnInputStream() throws Exception {
    testConvertClobPrepare();

    TypeHandlerUtils.convertClob(conn, new ByteArrayInputStream("BMP".getBytes()));

    // verify(conn, times(1)).createClob();
    MappingUtils.invokeFunction(
        verify(conn, times(1)), "createClob", new Class[] {}, new Object[] {});
    testConvertClobCheck();
  }