use of com.yahoo.bullet.storm.testing.CustomOutputFieldsDeclarer in project bullet-storm by yahoo.
the class FilterBoltTest method testOutputFields.
@Test
public void testOutputFields() {
CustomOutputFieldsDeclarer declarer = new CustomOutputFieldsDeclarer();
bolt.declareOutputFields(declarer);
Fields expected = new Fields(TopologyConstants.ID_FIELD, TopologyConstants.DATA_FIELD);
Assert.assertTrue(declarer.areFieldsPresent(TopologyConstants.DATA_STREAM, false, expected));
}
use of com.yahoo.bullet.storm.testing.CustomOutputFieldsDeclarer in project bullet-storm by yahoo.
the class JoinBoltTest method testOutputFields.
@Test
public void testOutputFields() {
CustomOutputFieldsDeclarer declarer = new CustomOutputFieldsDeclarer();
bolt.declareOutputFields(declarer);
Fields expectedResultFields = new Fields(TopologyConstants.ID_FIELD, TopologyConstants.RESULT_FIELD, TopologyConstants.METADATA_FIELD);
Fields expectedFeedbackFields = new Fields(TopologyConstants.ID_FIELD, TopologyConstants.METADATA_FIELD);
Assert.assertTrue(declarer.areFieldsPresent(TopologyConstants.RESULT_STREAM, false, expectedResultFields));
Assert.assertTrue(declarer.areFieldsPresent(TopologyConstants.FEEDBACK_STREAM, false, expectedFeedbackFields));
}
use of com.yahoo.bullet.storm.testing.CustomOutputFieldsDeclarer in project bullet-storm by yahoo.
the class QuerySpoutTest method testDeclaredOutputFields.
@Test
public void testDeclaredOutputFields() {
CustomOutputFieldsDeclarer declarer = new CustomOutputFieldsDeclarer();
spout.declareOutputFields(declarer);
Fields expectedQueryFields = new Fields(TopologyConstants.ID_FIELD, TopologyConstants.QUERY_FIELD, TopologyConstants.METADATA_FIELD);
Fields expectedMetadataFields = new Fields(TopologyConstants.ID_FIELD, TopologyConstants.METADATA_FIELD);
Assert.assertTrue(declarer.areFieldsPresent(TopologyConstants.QUERY_STREAM, false, expectedQueryFields));
Assert.assertTrue(declarer.areFieldsPresent(TopologyConstants.METADATA_STREAM, false, expectedMetadataFields));
}
use of com.yahoo.bullet.storm.testing.CustomOutputFieldsDeclarer in project bullet-storm by yahoo.
the class ResultBoltTest method testDeclareOutputFields.
@Test
public void testDeclareOutputFields() {
CustomOutputFieldsDeclarer declarer = new CustomOutputFieldsDeclarer();
bolt.declareOutputFields(declarer);
Assert.assertTrue(!declarer.areFieldsDeclared());
}
use of com.yahoo.bullet.storm.testing.CustomOutputFieldsDeclarer in project bullet-storm by yahoo.
the class LoopBoltTest method testDeclareOutputFields.
@Test
public void testDeclareOutputFields() {
CustomOutputFieldsDeclarer declarer = new CustomOutputFieldsDeclarer();
bolt.declareOutputFields(declarer);
Assert.assertTrue(!declarer.areFieldsDeclared());
}
Aggregations