[
https://issues.apache.org/jira/browse/NIFI-1213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15285600#comment-15285600
]
ASF subversion and git services commented on NIFI-1213:
-------------------------------------------------------
Commit fa390112cec29813921d1818623904b01604beb1 in nifi's branch
refs/heads/master from [~pvillard]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=fa39011 ]
NIFI-1213 Added the possibility to register FlowFile assertions in mock
framework
This closes #404
> Allow Mock Framework to register "FlowFile Assertions"
> ------------------------------------------------------
>
> Key: NIFI-1213
> URL: https://issues.apache.org/jira/browse/NIFI-1213
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Tools and Build
> Reporter: Mark Payne
> Assignee: Pierre Villard
> Fix For: 1.0.0, 0.7.0
>
>
> Often times, unit tests will invoke TestRunner.run, and then iterate through
> the output FlowFiles, ensuring that a particular attribute exists, or that an
> attribute is equal to some value.
> As a convenience, we should provide a mechanism to indicate that all output
> FlowFiles (or all FlowFiles routed to a given relationship) meet some
> criteria.
> For example:
> {code}
> TestRunner.assertAllFlowFilesContainAttribute( String attributeName );
> {code}
> {code}
> TestRunner.assertAllFlowFilesContainAttribute( Relationship relationship,
> String attributeName );
> {code}
> Additionally, we should consider allowing a "callback" mechanism:
> {code}
> TestRunner.assertAllFlowFiles( FlowFileValidator validator );
> {code}
> {code}
> TestRunner.assertAllFlowFiles( Relationship relationship, FlowFileValidator
> validator );
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)