You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by "Mark Payne (JIRA)" <ji...@apache.org> on 2015/11/23 18:55:11 UTC

[jira] [Created] (NIFI-1213) Allow Mock Framework to register "FlowFile Assertions"

Mark Payne created NIFI-1213:
--------------------------------

             Summary: 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)