Esempio n. 1
0
  @Test
  public void testConvertBlobString() throws Exception {
    testConvertBlobPrepare();

    TypeHandlerUtils.convertBlob(blob, "TIFF");

    testConvertBlobCheck();
  }
Esempio n. 2
0
  @Test
  public void testConvertBlobByte() throws Exception {
    testConvertBlobPrepare();

    TypeHandlerUtils.convertBlob(blob, "JPEG".getBytes());

    testConvertBlobCheck();
  }
Esempio n. 3
0
  @Test
  public void testConvertBlobInputStream() throws Exception {
    testConvertBlobPrepare();

    TypeHandlerUtils.convertBlob(blob, new ByteArrayInputStream("PNG".getBytes()));

    testConvertBlobCheck();
  }
Esempio n. 4
0
  @Test
  public void testConvertBlobConnInputStream() throws Exception {
    testConvertBlobPrepare();

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

    // verify(conn, times(1)).createBlob();
    MappingUtils.invokeFunction(
        verify(conn, times(1)), "createBlob", new Class[] {}, new Object[] {});
    testConvertBlobCheck();
  }
Esempio n. 5
0
  @Test
  public void testConvertBlobConnString() throws Exception {
    testConvertBlobPrepare();

    TypeHandlerUtils.convertBlob(conn, "PCX");

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