[ 
https://issues.apache.org/jira/browse/NIFI-1213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15267093#comment-15267093
 ] 

ASF GitHub Bot commented on NIFI-1213:
--------------------------------------

GitHub user pvillard31 opened a pull request:

    https://github.com/apache/nifi/pull/404

    NIFI-1213 Added the possibility to register FlowFile assertions in mock 
framework

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/pvillard31/nifi NIFI-1213

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/404.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 #404
    
----
commit 9c006043188a4175295120bfd96580c0c21e74a7
Author: Pierre Villard <[email protected]>
Date:   2016-05-02T17:54:53Z

    NIFI-1213 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
>             Fix For: 1.0.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)

Reply via email to