use of java.io.StringBufferInputStream in project cubrid-manager by CUBRID.
the class CUBRIDPreparedStatementProxyTest method methodSetAsciiStreamIntInputStream.
/**
* Test method for
* {@link com.cubrid.jdbc.proxy.driver.CUBRIDPreparedStatementProxy#setAsciiStream(int, java.io.InputStream)}
* .
*/
public void methodSetAsciiStreamIntInputStream(CUBRIDPreparedStatementProxy pstmt) {
String sql = "select * from " + testTableName + " where name = ?";
CUBRIDPreparedStatementProxy ps = null;
try {
ps = (CUBRIDPreparedStatementProxy) conn.prepareStatement(sql);
ps.setAsciiStream(1, new StringBufferInputStream("string buffer input string"));
} catch (SQLException e) {
assertTrue(false);
}
}
use of java.io.StringBufferInputStream in project cubrid-manager by CUBRID.
the class CUBRIDPreparedStatementProxyTest method methodSetAsciiStreamIntInputStreamInt.
/**
* Test method for
* {@link com.cubrid.jdbc.proxy.driver.CUBRIDPreparedStatementProxy#setAsciiStream(int, java.io.InputStream, int)}
* .
*/
public void methodSetAsciiStreamIntInputStreamInt(CUBRIDPreparedStatementProxy pstmt) {
String sql = "select * from " + testTableName + " where name = ?";
CUBRIDPreparedStatementProxy ps = null;
try {
ps = (CUBRIDPreparedStatementProxy) conn.prepareStatement(sql);
ps.setAsciiStream(1, new StringBufferInputStream("string buffer input string"), 3);
} catch (SQLException e) {
assertTrue(false);
}
}
use of java.io.StringBufferInputStream in project cubrid-manager by CUBRID.
the class CUBRIDPreparedStatementProxyTest method methodSetBinaryStreamIntInputStreamInt.
/**
* Test method for
* {@link com.cubrid.jdbc.proxy.driver.CUBRIDPreparedStatementProxy#setBinaryStream(int, java.io.InputStream, int)}
* .
*/
public void methodSetBinaryStreamIntInputStreamInt(CUBRIDPreparedStatementProxy pstmt) {
String sql = "select * from " + testTableName + " where name = ?";
CUBRIDPreparedStatementProxy ps = null;
try {
ps = (CUBRIDPreparedStatementProxy) conn.prepareStatement(sql);
ps.setBinaryStream(1, new StringBufferInputStream("string buffer input stream"), 2);
} catch (SQLException e) {
assertTrue(false);
}
}
use of java.io.StringBufferInputStream in project pentaho-platform by pentaho.
the class LocaleImportHandlerTest method shouldNotFailAndReturnNotNullWhenLegalXmlIsGiven.
@Test
public void shouldNotFailAndReturnNotNullWhenLegalXmlIsGiven() throws Exception {
String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<slave_config>" + "</slave_config>";
LocaleImportHandler lih = new LocaleImportHandler(Collections.emptyList(), null);
assertNotNull(lih.getLocalBundleDocument(new StringBufferInputStream(xml)));
}
use of java.io.StringBufferInputStream in project pentaho-platform by pentaho.
the class KettleSystemListenerTest method shouldNotFailAndReturnNotNullWhenLegalXmlIsGiven.
@Test
public void shouldNotFailAndReturnNotNullWhenLegalXmlIsGiven() throws Exception {
String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<slave_config>" + "</slave_config>";
KettleSystemListener ksl = new KettleSystemListener();
assertNotNull(ksl.getSlaveServerConfigNode(new StringBufferInputStream(xml)));
}
Aggregations