[
https://issues.apache.org/jira/browse/MINIFI-226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16013388#comment-16013388
]
ASF GitHub Bot commented on MINIFI-226:
---------------------------------------
Github user apiri commented on a diff in the pull request:
https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116892423
--- Diff: libminifi/test/unit/MockClasses.h ---
@@ -0,0 +1,139 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef LIBMINIFI_TEST_UNIT_MOCKCLASSES_H_
+#define LIBMINIFI_TEST_UNIT_MOCKCLASSES_H_
+
+#include "core/controller/ControllerService.h"
+#include "core/Processor.h"
+#include "core/ProcessContext.h"
+#include "core/ProcessSession.h"
+
+std::atomic<bool> disabled;
+
+class MockControllerService : public core::controller::ControllerService {
+ public:
+ explicit MockControllerService(const std::string &name, const
std::string &id)
+ : ControllerService(name, id) {
+
+ }
+
+ explicit MockControllerService(const std::string &name, uuid_t uuid)
+ : ControllerService(name, uuid) {
+
+ }
+
+ explicit MockControllerService(const std::string &name)
+ : ControllerService(name, 0) {
+
+ }
+ MockControllerService() {
+
+ }
+
+ ~MockControllerService() {
+
+ }
+
+ virtual void initialize() {
+ core::controller::ControllerService::initialize();
+ enable();
+ }
+
+ std::string doSomething() {
+ return str;
+ }
+
+ virtual void enable() {
+ str = "pushitrealgood";
--- End diff --
Glad Salt-N-Pepa made themselves present.
> Provide support for controller services
> ---------------------------------------
>
> Key: MINIFI-226
> URL: https://issues.apache.org/jira/browse/MINIFI-226
> Project: Apache NiFi MiNiFi
> Issue Type: New Feature
> Components: C++, Core Framework
> Reporter: Aldrin Piri
> Assignee: marco polo
>
> To facilitate feature parity in the C++ implementation, we should also
> provided Controller Services to the framework and associated configuration as
> provided by MINIFI-154 for Java.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)