コード例 #1
0
  @Test
  public void testConvertSqlXmlString() throws Exception {
    testConvertSqlXmlPrepare();

    TypeHandlerUtils.convertSqlXml(sqlXml, "TIFF");

    testConvertSqlXmlCheck();
  }
コード例 #2
0
  @Test
  public void testConvertSqlXmlInputStream() throws Exception {
    testConvertSqlXmlPrepare();

    TypeHandlerUtils.convertSqlXml(sqlXml, new ByteArrayInputStream("PNG".getBytes()));

    testConvertSqlXmlCheck();
  }
コード例 #3
0
  @Test
  public void testConvertSqlXmlByte() throws Exception {
    testConvertSqlXmlPrepare();

    TypeHandlerUtils.convertSqlXml(sqlXml, "JPEG".getBytes());

    testConvertSqlXmlCheck();
  }
コード例 #4
0
  @Test
  public void testConvertSqlXmlConnString() throws Exception {
    testConvertSqlXmlPrepare();

    TypeHandlerUtils.convertSqlXml(conn, "PCX");

    // verify(conn, times(1)).createSQLXML();
    MappingUtils.invokeFunction(
        verify(conn, times(1)), "createSQLXML", new Class[] {}, new Object[] {});
    testConvertSqlXmlCheck();
  }
コード例 #5
0
  @Test
  public void testConvertSqlXmlConnInputStream() throws Exception {
    testConvertSqlXmlPrepare();

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

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