[
https://issues.apache.org/jira/browse/NIFI-1213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15286222#comment-15286222
]
ASF GitHub Bot commented on NIFI-1213:
--------------------------------------
GitHub user pvillard31 opened a pull request:
https://github.com/apache/nifi/pull/451
NIFI-1213 (branch 0.x) Added the possibility to register FlowFile ass…
…ertions in mock framework
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/pvillard31/nifi NIFI-1213-0.x
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/nifi/pull/451.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #451
----
commit 8aa6292bcc5a58b535fd59a25b747aac549b0121
Author: Pierre Villard <[email protected]>
Date: 2016-05-17T08:36:56Z
NIFI-1213 (branch 0.x) Added the possibility to register FlowFile
assertions in mock framework
----
> 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)