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

    TypeHandlerUtils.convertBlob(blob, "TIFF");

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

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

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

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

    testConvertBlobCheck();
  }
Exemplo 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();
  }
Exemplo 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();
  }