Template Class PublisherMock
Defined in File publisher_mock.hpp
Inheritance Relationships
Base Type
public rtest::MockBase(Class MockBase)
Class Documentation
-
template<typename MessageT>
class PublisherMock : public rtest::MockBase A wrapper object for rclcpp::Publisher that intercepts the publish() method invocation and implements a mock for it.
- Template Parameters:
MessageT –
Public Functions
-
inline PublisherMock(rclcpp::PublisherBase *pub)
-
inline ~PublisherMock()
- MOCK_METHOD (void, publish,(const MessageT &msg))
This is the mock method that gets called eventually from all other overloads.
-
inline void setSubscriptionCount(size_t count)
Set the fake subscriptions count.
- Parameters:
count – number of fake subscriptions