fgerlits commented on code in PR #2241: URL: https://github.com/apache/nifi-minifi-cpp/pull/2241#discussion_r3756749264
########## extensions/stable-api-testing/PropertyTester.h: ########## @@ -0,0 +1,87 @@ +/** + * 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. + */ + +#pragma once + +#include "api/core/ProcessorImpl.h" +#include "api/utils/Export.h" +#include "api/utils/ProcessorConfigUtils.h" +#include "core/PropertyDefinitionBuilder.h" +#include "minifi-api.h" +#include "minifi-cpp/core/Annotation.h" + +namespace org::apache::nifi::minifi::api_testing { + +class PropertyTester : public api::core::ProcessorImpl { + public: + EXTENSIONAPI static constexpr const char* Description = "To test optional (not-required) properties with default value"; Review Comment: ```suggestion EXTENSIONAPI static constexpr const char* Description = "Test processor to test the parsing of properties in the flow configuration"; ``` since it tests both required and non-required, and with or without default value. ########## extensions/stable-api-testing/PropertyTester.h: ########## Review Comment: Maybe an `OptionalPropertyWithoutDefaultValue` property could be added, to cover all 4 cases? ########## extensions/stable-api-testing/tests/PropertyTesterTests.cpp: ########## Review Comment: In the tests for the non-error cases, I would add checks for all 3 properties (or 4 if you add the 4th), for documentation purposes. For example, to make it clear that a required property with default value can, and should, be omitted from the flow config if we want it to have the default value. -- 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]
