use of com.hortonworks.streamline.streams.StreamlineEvent in project streamline by hortonworks.
the class StreamlineEventImplTest method testRemoveIterator.
@Test(expected = UnsupportedOperationException.class)
public void testRemoveIterator() throws Exception {
Map<String, Object> map = new HashMap<>();
map.put("foo", "bar");
StreamlineEvent event = StreamlineEventImpl.builder().fieldsAndValues(map).build();
Iterator<Map.Entry<String, Object>> it = event.entrySet().iterator();
while (it.hasNext()) {
it.next();
it.remove();
}
}
use of com.hortonworks.streamline.streams.StreamlineEvent in project streamline by hortonworks.
the class StreamlineEventImplTest method testGetFieldsAndValues.
@Test
public void testGetFieldsAndValues() throws Exception {
Map<String, Object> map = new HashMap<>();
map.put("a", "aval");
map.put("b", "bval");
StreamlineEvent event = StreamlineEventImpl.builder().fieldsAndValues(map).build();
assertEquals(map, event);
}
use of com.hortonworks.streamline.streams.StreamlineEvent in project streamline by hortonworks.
the class StreamlineEventImplTest method testGetSourceStream.
@Test
public void testGetSourceStream() throws Exception {
String sourceStream = "stream";
StreamlineEvent event = StreamlineEventImpl.builder().fieldsAndValues(Collections.emptyMap()).dataSourceId("1").build();
assertEquals(StreamlineEventImpl.DEFAULT_SOURCE_STREAM, event.getSourceStream());
event = StreamlineEventImpl.builder().fieldsAndValues(Collections.emptyMap()).dataSourceId("1").sourceStream(sourceStream).build();
assertEquals(sourceStream, event.getSourceStream());
}
use of com.hortonworks.streamline.streams.StreamlineEvent in project streamline by hortonworks.
the class StreamlineEventImplTest method testPutAll.
@Test(expected = UnsupportedOperationException.class)
public void testPutAll() throws Exception {
Map<String, Object> map = new HashMap<>();
map.put("foo", "bar");
StreamlineEvent event = StreamlineEventImpl.builder().fieldsAndValues(Collections.emptyMap()).build();
event.putAll(map);
}
use of com.hortonworks.streamline.streams.StreamlineEvent in project streamline by hortonworks.
the class StreamlineEventImplTest method testRemove.
@Test(expected = UnsupportedOperationException.class)
public void testRemove() throws Exception {
Map<String, Object> map = new HashMap<>();
map.put("foo", "bar");
StreamlineEvent event = StreamlineEventImpl.builder().fieldsAndValues(Collections.emptyMap()).build();
event.remove("foo");
}
Aggregations