arpadboda commented on a change in pull request #1144:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1144#discussion_r681950852



##########
File path: libminifi/test/unit/ProcessSessionTests.cpp
##########
@@ -31,25 +32,16 @@ REGISTER_RESOURCE(DummyProcessor, "A processor that does 
nothing.");
 
 class Fixture {
  public:
-  Fixture();
   core::ProcessSession &processSession() { return *process_session_; }
 
  private:
   TestController test_controller_;
-  std::shared_ptr<TestPlan> test_plan_;
-  std::shared_ptr<core::Processor> dummy_processor_;
-  std::shared_ptr<core::ProcessContext> context_;
-  std::unique_ptr<core::ProcessSession> process_session_;
+  std::shared_ptr<TestPlan> test_plan_ = test_controller_.createPlan();
+  std::shared_ptr<core::Processor> dummy_processor_ = 
test_plan_->addProcessor("DummyProcessor", "dummyProcessor");
+  std::shared_ptr<core::ProcessContext> context_ = [this] { 
test_plan_->runNextProcessor(); return test_plan_->getCurrentContext(); }();
+  std::unique_ptr<core::ProcessSession> process_session_ = 
std::make_unique<core::ProcessSession>(context_);
 };
 
-Fixture::Fixture() {

Review comment:
       What's the motivation behind deleting this?




-- 
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