|
| 1 | +/****************************************************************************** |
| 2 | +* BeamAdapter plugin * |
| 3 | +* (c) 2006 Inria, University of Lille, CNRS * |
| 4 | +* * |
| 5 | +* This program is free software; you can redistribute it and/or modify it * |
| 6 | +* under the terms of the GNU Lesser General Public License as published by * |
| 7 | +* the Free Software Foundation; either version 2.1 of the License, or (at * |
| 8 | +* your option) any later version. * |
| 9 | +* * |
| 10 | +* This program is distributed in the hope that it will be useful, but WITHOUT * |
| 11 | +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * |
| 12 | +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * |
| 13 | +* for more details. * |
| 14 | +* * |
| 15 | +* You should have received a copy of the GNU Lesser General Public License * |
| 16 | +* along with this program. If not, see <http://www.gnu.org/licenses/>. * |
| 17 | +******************************************************************************* |
| 18 | +* Authors: see Authors.md * |
| 19 | +* * |
| 20 | +* Contact information: contact@sofa-framework.org * |
| 21 | +******************************************************************************/ |
| 22 | +#include <gtest/gtest.h> |
| 23 | +#include <sofa/simulation/graph/DAGNode.h> |
| 24 | +#include <sofa/simpleapi/SimpleApi.h> |
| 25 | +#include <sofa/core/ObjectFactory.h> |
| 26 | + |
| 27 | +TEST(AdaptiveBeamController, target) |
| 28 | +{ |
| 29 | + const auto node = sofa::simpleapi::createNode("node"); |
| 30 | + const auto controller = sofa::simpleapi::createObject(node, "AdaptiveBeamController"); |
| 31 | + |
| 32 | + const auto& creators = sofa::core::ObjectFactory::getInstance()->getEntry("AdaptiveBeamController").creatorMap; |
| 33 | + |
| 34 | + const auto it = creators.find(sofa::defaulttype::Rigid3Types::Name()); |
| 35 | + EXPECT_NE(it, creators.end()); |
| 36 | + |
| 37 | + EXPECT_EQ(std::string(it->second->getTarget()), std::string("BeamAdapter")); |
| 38 | +} |
0 commit comments