本文整理汇总了Java中org.apache.nifi.util.MockFlowFile.assertAttributeNotExists方法的典型用法代码示例。如果您正苦于以下问题:Java MockFlowFile.assertAttributeNotExists方法的具体用法?Java MockFlowFile.assertAttributeNotExists怎么用?Java MockFlowFile.assertAttributeNotExists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.nifi.util.MockFlowFile
的用法示例。
在下文中一共展示了MockFlowFile.assertAttributeNotExists方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testFailure
import org.apache.nifi.util.MockFlowFile; //导入方法依赖的package包/类
@Test
public void testFailure() {
runner.setProperty(DuplicateByAttribute.ATTRIBUTE_TO_DUPLICATE_BY, "list_of_things");
runner.setProperty(DuplicateByAttribute.OUTPUT_ATTRIBUTE, "thing");
final Map<String, String> attributes = new HashMap<String, String>();
attributes.put("list_of_things", "\"lions,\"tigers\",\"bears\"");
runner.enqueue("some content".getBytes(), attributes);
runner.run();
runner.assertTransferCount(DuplicateByAttribute.REL_SUCCESS, 0);
runner.assertTransferCount(DuplicateByAttribute.REL_FAILURE, 1);
runner.assertTransferCount(DuplicateByAttribute.REL_ORIGINAL, 0);
for (final MockFlowFile flowFile : runner.getFlowFilesForRelationship(DuplicateByAttribute.REL_FAILURE)) {
flowFile.assertAttributeExists("list_of_things");
flowFile.assertAttributeEquals("list_of_things", "\"lions,\"tigers\",\"bears\"");
flowFile.assertAttributeNotExists("thing");
flowFile.assertContentEquals("some content");
}
}