fgerlits commented on code in PR #1297:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1297#discussion_r871326613


##########
libminifi/test/SingleProcessorTestController.h:
##########
@@ -28,16 +28,13 @@
 #include "core/Processor.h"
 
 namespace org::apache::nifi::minifi::test {
-class SingleInputTestController : public TestController {
+class SingleProcessorTestController : public TestController {
  public:
-  explicit SingleInputTestController(const std::shared_ptr<core::Processor>& 
processor)
+  explicit SingleProcessorTestController(const 
std::shared_ptr<core::Processor>& processor)
       : processor_{plan->addProcessor(processor, processor->getName())}
   {}
 
-  std::unordered_map<core::Relationship, 
std::vector<std::shared_ptr<core::FlowFile>>>
-  trigger(const std::string_view input_flow_file_content, 
std::unordered_map<std::string, std::string> input_flow_file_attributes = {}) {
-    const auto new_flow_file = createFlowFile(input_flow_file_content, 
std::move(input_flow_file_attributes));
-    input_->put(new_flow_file);
+  auto trigger() {

Review Comment:
   I like functions to perform a single operation, and `onTrigger()` is not a 
functional interface, so I would have gone in the opposite direction, to
   ```c++
   putInput(createFlowFile(content, attributes));
   trigger();
   auto results_success = getOutput(Success);
   ```
   but I like the idea of having a functional interface, too, so yes, it's OK 
to change it back.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to