use of com.adaptris.core.services.jdbc.AllRowsMetadataTranslator in project interlok by adaptris.
the class StoredProcedureProducerTest method testMultipleResultSetsMetadataTranslator.
@Test
public void testMultipleResultSetsMetadataTranslator() throws Exception {
if (areTestsEnabled()) {
JdbcStoredProcedureProducer spp = new JdbcStoredProcedureProducer();
spp.setProcedureName(("many_resultsets"));
spp.setResultSetTranslator(new AllRowsMetadataTranslator());
AdaptrisMessage message = createMessage();
assertEquals(0, message.getMetadata().size());
StandaloneProducer producer = configureForTests(spp, true);
try {
start(producer);
producer.doService(message);
assertEquals(30, message.getMetadata().size());
} finally {
stop(producer);
}
}
}
use of com.adaptris.core.services.jdbc.AllRowsMetadataTranslator in project interlok by adaptris.
the class StoredProcedureProducerTest method testOneResultSetMetadataTranslator.
@Test
public void testOneResultSetMetadataTranslator() throws Exception {
if (areTestsEnabled()) {
JdbcStoredProcedureProducer spp = new JdbcStoredProcedureProducer();
spp.setProcedureName(("one_resultset"));
spp.setResultSetTranslator(new AllRowsMetadataTranslator());
AdaptrisMessage message = createMessage();
assertEquals(0, message.getMetadata().size());
StandaloneProducer producer = configureForTests(spp, true);
try {
start(producer);
producer.doService(message);
assertEquals(15, message.getMetadata().size());
} finally {
stop(producer);
}
}
}
Aggregations