// Path: src/main/java/bv/offa/netbeans/cnd/unittest/api/TestFramework.java
// public enum TestFramework
// {
//     /** CppUTest. */
//     CPPUTEST("CppUTest"),
//     /** GoogleTest / GoogleMock. */
//     GOOGLETEST("GoogleTest"),
//     /** LibunittestC++. */
//     LIBUNITTESTCPP("LibunittestCpp");
// 
// 
//     private final String name;
// 
// 
//     TestFramework(String name)
//     {
//         this.name = name;
//     }
// 
// 
//     /**
//      * Returns the name of the framework.
//      *
//      * @return  Name
//      */
//     public String getName()
//     {
//         return name;
//     }
// }
// 
// Path: src/main/java/bv/offa/netbeans/cnd/unittest/ui/TestRunnerUINodeFactory.java
// public class TestRunnerUINodeFactory extends TestRunnerNodeFactory
// {
//     /**
//      * Creates a new testmethod node.
//      *
//      * @param testcase  Testcase
//      * @param project   Project
//      * @return          Node
//      */
//     @Override
//     public Node createTestMethodNode(Testcase testcase, Project project)
//     {
//         return new TestRunnerTestMethodNode((CndTestCase) testcase, project);
//     }
// 
// 
//     /**
//      * Creates a new callstack node.
//      *
//      * @param frameInfo     Callstack frameinfo
//      * @param displayName   Display name
//      * @return              Node
//      */
//     @Override
//     public Node createCallstackFrameNode(String frameInfo, String displayName)
//     {
//         return new TestRunnerCallstackFrameNode(frameInfo, displayName);
//     }
// 
// 
//     /**
//      * Creates a new testsuite node.
//      *
//      * @param suiteName Testsuite name
//      * @param filtered  Filtered
//      * @return          Node
//      */
//     @Override
//     public TestsuiteNode createTestSuiteNode(String suiteName, boolean filtered)
//     {
//         return new TestRunnerTestSuiteNode(suiteName, filtered);
//     }
// 
// }


import bv.offa.netbeans.cnd.unittest.api.TestFramework;
import bv.offa.netbeans.cnd.unittest.ui.TestRunnerUINodeFactory;
import java.util.ArrayList;
import java.util.List;
import org.netbeans.modules.cnd.testrunner.spi.TestHandlerFactory;
import org.netbeans.modules.cnd.testrunner.spi.TestRecognizerHandler;
import org.netbeans.modules.gsf.testrunner.ui.api.Manager;
/*
 * NBCndUnit - C/C++ unit tests for NetBeans.
 * Copyright (C) 2015-2021  offa
 * 
 * This file is part of NBCndUnit.
 *
 * NBCndUnit is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * NBCndUnit is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with NBCndUnit.  If not, see <http://www.gnu.org/licenses/>.
 */

package bv.offa.netbeans.cnd.unittest.googletest;


/**
 * The class {@code GoogleTestTestHandlerFactory} implements a factory for
 * <i>GoogleTest</i> test handler.
 * 
 * @author offa
 */
public class GoogleTestTestHandlerFactory implements TestHandlerFactory
{
    
    /**
     * Creates handlers for the unit test output.
     * 
     * @return  Test output handler
     */
    @Override
    public List<TestRecognizerHandler> createHandlers()
    {
        Manager.getInstance().setTestingFramework(TestFramework.GOOGLETEST.getName());
// Path: src/main/java/bv/offa/netbeans/cnd/unittest/api/TestFramework.java
// public enum TestFramework
// {
//     /** CppUTest. */
//     CPPUTEST("CppUTest"),
//     /** GoogleTest / GoogleMock. */
//     GOOGLETEST("GoogleTest"),
//     /** LibunittestC++. */
//     LIBUNITTESTCPP("LibunittestCpp");
// 
// 
//     private final String name;
// 
// 
//     TestFramework(String name)
//     {
//         this.name = name;
//     }
// 
// 
//     /**
//      * Returns the name of the framework.
//      *
//      * @return  Name
//      */
//     public String getName()
//     {
//         return name;
//     }
// }
// 
// Path: src/main/java/bv/offa/netbeans/cnd/unittest/ui/TestRunnerUINodeFactory.java
// public class TestRunnerUINodeFactory extends TestRunnerNodeFactory
// {
//     /**
//      * Creates a new testmethod node.
//      *
//      * @param testcase  Testcase
//      * @param project   Project
//      * @return          Node
//      */
//     @Override
//     public Node createTestMethodNode(Testcase testcase, Project project)
//     {
//         return new TestRunnerTestMethodNode((CndTestCase) testcase, project);
//     }
// 
// 
//     /**
//      * Creates a new callstack node.
//      *
//      * @param frameInfo     Callstack frameinfo
//      * @param displayName   Display name
//      * @return              Node
//      */
//     @Override
//     public Node createCallstackFrameNode(String frameInfo, String displayName)
//     {
//         return new TestRunnerCallstackFrameNode(frameInfo, displayName);
//     }
// 
// 
//     /**
//      * Creates a new testsuite node.
//      *
//      * @param suiteName Testsuite name
//      * @param filtered  Filtered
//      * @return          Node
//      */
//     @Override
//     public TestsuiteNode createTestSuiteNode(String suiteName, boolean filtered)
//     {
//         return new TestRunnerTestSuiteNode(suiteName, filtered);
//     }
// 
// }


// Path: src/main/java/bv/offa/netbeans/cnd/unittest/googletest/GoogleTestTestHandlerFactory.java
import bv.offa.netbeans.cnd.unittest.api.TestFramework;
import bv.offa.netbeans.cnd.unittest.ui.TestRunnerUINodeFactory;
import java.util.ArrayList;
import java.util.List;
import org.netbeans.modules.cnd.testrunner.spi.TestHandlerFactory;
import org.netbeans.modules.cnd.testrunner.spi.TestRecognizerHandler;
import org.netbeans.modules.gsf.testrunner.ui.api.Manager;

/*
 * NBCndUnit - C/C++ unit tests for NetBeans.
 * Copyright (C) 2015-2021  offa
 * 
 * This file is part of NBCndUnit.
 *
 * NBCndUnit is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * NBCndUnit is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with NBCndUnit.  If not, see <http://www.gnu.org/licenses/>.
 */

package bv.offa.netbeans.cnd.unittest.googletest;


/**
 * The class {@code GoogleTestTestHandlerFactory} implements a factory for
 * <i>GoogleTest</i> test handler.
 * 
 * @author offa
 */
public class GoogleTestTestHandlerFactory implements TestHandlerFactory
{
    
    /**
     * Creates handlers for the unit test output.
     * 
     * @return  Test output handler
     */
    @Override
    public List<TestRecognizerHandler> createHandlers()
    {
        Manager.getInstance().setTestingFramework(TestFramework.GOOGLETEST.getName());
        Manager.getInstance().setNodeFactory(new TestRunnerUINodeFactory());