MoveIt Pro Behavior
Core Behaviors for MoveIt Pro
|
Adds testing capabilities of Behaviors without context to any test fixture. More...
#include <test_behavior.hpp>
Public Member Functions | |
void | initBehavior (const std::string &name, PortSetterMapGenerator input_port_setter_generator, PortSetterMapGenerator output_port_setter_generator) |
Initializes the Behavior under test. More... | |
BehaviorT & | behavior () |
BT::NodeConfiguration & | config () |
BT::Blackboard & | blackboard () |
Adds testing capabilities of Behaviors without context to any test fixture.
To test a Behavior without context (shared resources), a test fixture inherits from this class in addition to any base test fixture, e.g. ::testing::Test, ::moveit_studio::test_utils::RostTest, etc. The fixture automatically tests that the Behavior creates all and only the expected ports.
BehaviorT | The class of the Behavior under test. |
|
inline |
|
inline |
|
inline |
void moveit_studio::test_utils::WithBehaviorWithoutContext< BehaviorT >::initBehavior | ( | const std::string & | name, |
PortSetterMapGenerator | input_port_setter_generator, | ||
PortSetterMapGenerator | output_port_setter_generator | ||
) |
Initializes the Behavior under test.
Call this function in your fixture's constructor, SetUp() or any of its setUp* variations.
name | The name of the Behavior. |
input_port_setter_generator | A port setter map generator defining the expected input ports. |
output_port_setter_generator | A port setter map generator defining the expected output ports. |
WrongBehaviorPortsException | if the Behavior does not define exactly the expected ports. |