use of com.ibm.streams.operator.types.Blob in project streamsx.topology by IBMStreams.
the class PublishSubscribeTest method testFilterOnBlob.
@Test(expected = IllegalArgumentException.class)
public void testFilterOnBlob() throws Exception {
final Topology t = new Topology();
TStream<Blob> blobs = t.constants(Collections.<Blob>emptyList()).asType(Blob.class);
blobs.publish("sometopic", true);
}
use of com.ibm.streams.operator.types.Blob in project streamsx.topology by IBMStreams.
the class BlobTupleTest method testConstant.
@Test
public void testConstant() throws Exception {
final Topology topology = newTopology();
String sdata = "YY" + BlobTupleTest.class.getName();
byte[] data = sdata.getBytes(StandardCharsets.UTF_8);
Blob blob = ValueFactory.newBlob(data, 0, data.length);
TStream<Blob> source = topology.constants(Collections.singletonList(blob)).asType(Blob.class);
assertNotNull(source);
assertEquals(Blob.class, source.getTupleClass());
assertEquals(Blob.class, source.getTupleType());
TStream<String> out = convertBlobToString(source);
completeAndValidate(out, 10, sdata);
}
Aggregations