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

    TypeHandlerUtils.convertClob(clob, "TIFF");

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

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

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

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

    testConvertClobCheck();
  }
예제 #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();
  }
예제 #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();
  }