Github user achristianson commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/157#discussion_r147565654
  
    --- Diff: libminifi/test/bustache-tests/ApplyTemplateTests.cpp ---
    @@ -0,0 +1,131 @@
    +/**
    + *
    + * 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.
    + */
    +#define CATCH_CONFIG_MAIN  // This tells Catch to provide a main() - only 
do this in one cpp file
    +#include <uuid/uuid.h>
    +#include <fstream>
    +#include <map>
    +#include <memory>
    +#include <utility>
    +#include <string>
    +#include <set>
    +#include <iostream>
    +
    +#include "../TestBase.h"
    +#include "core/Core.h"
    +
    +#include "core/FlowFile.h"
    +#include "core/Processor.h"
    +#include "core/ProcessContext.h"
    +#include "core/ProcessSession.h"
    +#include "core/ProcessorNode.h"
    +
    +#include "ApplyTemplate.h"
    +#include "processors/GetFile.h"
    +#include "processors/ExtractText.h"
    +
    +const char* TEMPLATE = "TemplateBegins\n{{ ExampleAttribute 
}}\nTemplateEnds";
    +const char* TEMPLATE_FILE = "test_template.txt";
    +const char* TEST_ATTR = "ExampleAttribute";
    +const char* TEST_VALUE = "ExampleValue";
    +const char* TEST_FILE = "test_file.txt";
    +const char* EXPECT_OUTPUT = "TemplateBegins\nExampleValue\nTemplateEnds";
    +
    +TEST_CASE("Test Creation of ApplyTemplate", "[ApplyTemplateCreate]") {
    +    TestController testController;
    +    std::shared_ptr<core::Processor> processor = 
std::make_shared<org::apache::nifi::minifi::processors::ApplyTemplate>("processorname");
    +    REQUIRE(processor->getName() == "processorname");
    +    uuid_t processoruuid;
    +    REQUIRE(true == processor->getUUID(processoruuid));
    --- End diff --
    
    Minor nit: simplify to `REQUIRE(processor->getUUID(processoruuid));`


---

Reply via email to