WithBehaviorWithoutContext Class Template
Adds testing capabilities of Behaviors without context to any test fixture. More...
Declaration
class moveit_pro::test_utils::WithBehaviorWithoutContext<BehaviorT> { ... }
Included Headers
Public Member Functions Index
template <class BehaviorT> | |
| void | initBehavior (const std::string &name, PortSetterMapGenerator input_port_setter_generator, PortSetterMapGenerator output_port_setter_generator) |
|
Initializes the Behavior under test. More... | |
template <class BehaviorT> | |
| BehaviorT & | behavior () |
template <class BehaviorT> | |
| BT::NodeConfiguration & | config () |
template <class BehaviorT> | |
| BT::Blackboard & | blackboard () |
Private Member Attributes Index
template <class BehaviorT> | |
| std::unique_ptr< BehaviorT > | behavior_ |
template <class BehaviorT> | |
| BT::NodeConfiguration | config_ |
Description
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_pro::test_utils::RostTest, etc. The fixture automatically tests that the Behavior creates all and only the expected ports.
- Template Parameters
-
BehaviorT The class of the Behavior under test.
Definition at line 54 of file test_behavior.hpp.
Public Member Functions
behavior()
| inline |
Definition at line 68 of file test_behavior.hpp.
blackboard()
| inline |
Definition at line 76 of file test_behavior.hpp.
config()
| inline |
Definition at line 72 of file test_behavior.hpp.
initBehavior()
|
Initializes the Behavior under test.
Call this function in your fixture's constructor, SetUp() or any of its setUp* variations.
- Parameters
-
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.
- Exceptions
-
<a href="/api/classes/moveit-pro/test-utils/wrongbehaviorportsexception">WrongBehaviorPortsException</a> if the Behavior does not define exactly the expected ports.
Declaration at line 65 of file test_behavior.hpp, definition at line 130 of file test_behavior_impl.hpp.
Private Member Attributes
behavior_
|
Definition at line 82 of file test_behavior.hpp.
config_
|
Definition at line 83 of file test_behavior.hpp.
The documentation for this class was generated from the following files:
Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.