const std::string custom_response,
SentResponseCallback sent_response_callback)
: socket_(unix_socket), custom_response_(custom_response),
- sent_response_callback_(sent_response_callback) {
+ raw_buf_(), sent_response_callback_(sent_response_callback) {
}
/// @brief Starts asynchronous read from the socket.
/// @brief Manually construct the event and state dictionaries.
/// This allows testing without running startModel.
- void initDictionaries() {
+ void initTestDictionaries() {
ASSERT_NO_THROW(defineEvents());
ASSERT_NO_THROW(verifyEvents());
ASSERT_NO_THROW(defineStates());
/// a normal conclusion.
TEST_F(StateModelTest, transitionWithEnd) {
// Init dictionaries manually, normally done by startModel.
- initDictionaries();
+ initTestDictionaries();
// call transition to move from NEW_ST to DUMMY_ST with START_EVT
EXPECT_NO_THROW(transition(DUMMY_ST, START_EVT));
/// failed conclusion.
TEST_F(StateModelTest, transitionWithAbort) {
// Init dictionaries manually, normally done by startModel.
- initDictionaries();
+ initTestDictionaries();
// call transition to move from NEW_ST to DUMMY_ST with START_EVT
EXPECT_NO_THROW(transition(DUMMY_ST, START_EVT));
/// work properly.
TEST_F(StateModelTest, doFlags) {
// Init dictionaries manually, normally done by startModel.
- initDictionaries();
+ initTestDictionaries();
// Verify that "do" flags are false.
EXPECT_FALSE(doOnEntry());
/// the model is running but not after.
TEST_F(StateModelTest, statusMethods) {
// Init dictionaries manually, normally done by startModel.
- initDictionaries();
+ initTestDictionaries();
// After construction, state model is "new", all others should be false.
EXPECT_TRUE(isModelNew());