#include <gmock/gmock.h>#include <gtest/gtest.h>#include <aws/core/Aws.h>#include <aws/core/config/AWSProfileConfigLoader.h>#include <aws/core/utils/HashingUtils.h>#include <aws/core/utils/Outcome.h>#include <aws/core/utils/logging/AWSLogging.h>#include <aws/core/utils/logging/DefaultLogSystem.h>#include <aws/lex/LexRuntimeServiceClient.h>#include <aws_common/sdk_utils/aws_error.h>#include <aws_ros1_common/sdk_utils/logging/aws_ros_logger.h>#include <lex_node/lex_node.h>#include <ros/ros.h>
Go to the source code of this file.
Classes | |
| class | MockPostContentInterface |
| struct | PairKeyValue |
Namespaces | |
| lex_common_msgs | |
Typedefs | |
| typedef std::pair< std::string, std::string > | SlotPair |
Functions | |
| void | ExecuteLexServiceTest (bool will_succeed, const std::shared_ptr< MockPostContentInterface > &mock_post_content, const std::shared_ptr< AudioTextConversation::Request > &test_request, std::shared_ptr< AudioTextConversation::Response > &test_result) |
| void | h_sig_sigint (int signum) |
| int | main (int argc, char **argv) |
| bool | lex_common_msgs::operator== (const lex_common_msgs::KeyValue &left, const lex_common_msgs::KeyValue &right) |
| ros1 messages do not provide == operators More... | |
| TEST (LexNodeSuite, BuildLexNodeWithEmptyParams) | |
| TEST (LexNodeSuite, TestLexServiceFailedPostContent) | |
| TEST (LexNodeSuite, TestLexServiceSuccess) | |
| typedef std::pair<std::string, std::string> SlotPair |
Definition at line 61 of file lex_node_test.cpp.
| void ExecuteLexServiceTest | ( | bool | will_succeed, |
| const std::shared_ptr< MockPostContentInterface > & | mock_post_content, | ||
| const std::shared_ptr< AudioTextConversation::Request > & | test_request, | ||
| std::shared_ptr< AudioTextConversation::Response > & | test_result | ||
| ) |
Spin up a lex node and initialize it with the mock_post_content. Will Fail the running test should a timeout occur.
| will_succeed | compares if the service call should succeed |
| mock_post_content | for the lex node to call |
| test_request | |
| test_result | [out] |
Definition at line 106 of file lex_node_test.cpp.
| void h_sig_sigint | ( | int | signum | ) |
Interrupt handler to ensure rclcpp is shutdown.
| signum |
Definition at line 210 of file lex_node_test.cpp.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 216 of file lex_node_test.cpp.
| TEST | ( | LexNodeSuite | , |
| BuildLexNodeWithEmptyParams | |||
| ) |
Tests the creation of a Lex node instance with invalid parameters
Definition at line 89 of file lex_node_test.cpp.
| TEST | ( | LexNodeSuite | , |
| TestLexServiceFailedPostContent | |||
| ) |
Tests error code from lex node when there was a failure to post content.
Definition at line 135 of file lex_node_test.cpp.
| TEST | ( | LexNodeSuite | , |
| TestLexServiceSuccess | |||
| ) |
Tests successful interaction with the lex node service.
Definition at line 153 of file lex_node_test.cpp.