use of org.apache.nifi.registry.flow.diff.StandardFlowDifference in project nifi by apache.
the class TestFlowDifferenceFilters method testFilterAddedRemotePortsWithNonRemoteInputPort.
@Test
public void testFilterAddedRemotePortsWithNonRemoteInputPort() {
VersionedProcessor versionedProcessor = new VersionedProcessor();
versionedProcessor.setComponentType(ComponentType.PROCESSOR);
StandardFlowDifference flowDifference = new StandardFlowDifference(DifferenceType.COMPONENT_ADDED, null, versionedProcessor, null, null, "");
// predicate should return true because we do want to include changes for adding a non-port
Assert.assertTrue(FlowDifferenceFilters.FILTER_ADDED_REMOVED_REMOTE_PORTS.test(flowDifference));
}
use of org.apache.nifi.registry.flow.diff.StandardFlowDifference in project nifi by apache.
the class TestFlowDifferenceFilters method testFilterAddedRemotePortsWithRemoteInputPortAsComponentA.
@Test
public void testFilterAddedRemotePortsWithRemoteInputPortAsComponentA() {
VersionedRemoteGroupPort remoteGroupPort = new VersionedRemoteGroupPort();
remoteGroupPort.setComponentType(ComponentType.REMOTE_INPUT_PORT);
StandardFlowDifference flowDifference = new StandardFlowDifference(DifferenceType.COMPONENT_ADDED, remoteGroupPort, null, null, null, "");
// predicate should return false because we don't want to include changes for adding a remote input port
Assert.assertFalse(FlowDifferenceFilters.FILTER_ADDED_REMOVED_REMOTE_PORTS.test(flowDifference));
}
use of org.apache.nifi.registry.flow.diff.StandardFlowDifference in project nifi by apache.
the class TestFlowDifferenceFilters method testFilterAddedRemotePortsWithRemoteOutputPort.
@Test
public void testFilterAddedRemotePortsWithRemoteOutputPort() {
VersionedRemoteGroupPort remoteGroupPort = new VersionedRemoteGroupPort();
remoteGroupPort.setComponentType(ComponentType.REMOTE_OUTPUT_PORT);
StandardFlowDifference flowDifference = new StandardFlowDifference(DifferenceType.COMPONENT_ADDED, null, remoteGroupPort, null, null, "");
// predicate should return false because we don't want to include changes for adding a remote input port
Assert.assertFalse(FlowDifferenceFilters.FILTER_ADDED_REMOVED_REMOTE_PORTS.test(flowDifference));
}
use of org.apache.nifi.registry.flow.diff.StandardFlowDifference in project nifi by apache.
the class TestFlowDifferenceFilters method testFilterAddedRemotePortsWithRemoteInputPortAsComponentB.
@Test
public void testFilterAddedRemotePortsWithRemoteInputPortAsComponentB() {
VersionedRemoteGroupPort remoteGroupPort = new VersionedRemoteGroupPort();
remoteGroupPort.setComponentType(ComponentType.REMOTE_INPUT_PORT);
StandardFlowDifference flowDifference = new StandardFlowDifference(DifferenceType.COMPONENT_ADDED, null, remoteGroupPort, null, null, "");
// predicate should return false because we don't want to include changes for adding a remote input port
Assert.assertFalse(FlowDifferenceFilters.FILTER_ADDED_REMOVED_REMOTE_PORTS.test(flowDifference));
}
Aggregations