![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Classes | |
class | HTTPContentTest |
class | LogEntryStreamTest |
class | LoggerTest |
class | MockLogger |
class | MockModuleLogger |
class | TestLogger |
Functions | |
TEST_F (HTTPContentTest, test_readStatusCodeSuccess) | |
Test that isStatusCodeSuccess returns true for SUCCESS_STATUS_CODE . More... | |
TEST_F (HTTPContentTest, test_readStatusCodePartialContentSuccess) | |
Test that isStatusCodeSuccess returns true for SUCCESS_PARTIAL_CONTENT_STATUS_CODE . More... | |
TEST_F (HTTPContentTest, test_readStatusCodeNotSuccess) | |
Test that isStatusCodeSuccess returns false for BAD_STATUS_CODE . More... | |
TEST_F (HTTPContentTest, test_readStatusCodeMoreThanOnce) | |
Test that we can use getStatusCode() to get the status code after using isStatusCodeSuccess() . More... | |
TEST_F (HTTPContentTest, test_readContentTypeMoreThanOnce) | |
Test that we can use getContentType() to get the status code after using isStatusCodeSuccess() . More... | |
TEST_F (HTTPContentTest, test_getDataStream) | |
Test that we can retrieve the attachment reader, even if it's nullptr. More... | |
TEST_F (LogEntryStreamTest, test_emptyStream) | |
Test that a new LogEntryStream instance's c_str() returns an empty string. More... | |
TEST_F (LogEntryStreamTest, test_shortString) | |
Send a character to an empty LogEntryStream. Expect that c_str() returns a string with just that character. More... | |
TEST_F (LogEntryStreamTest, test_mediumString) | |
Send a medium sized string test to an empty LogEntryStream. Expect that c_str() returns a matching string. More... | |
TEST_F (LogEntryStreamTest, test_longString) | |
Send a long string test to an empty LogEntryStream. Expect that c_str() returns a matching string. More... | |
TEST_F (LogEntryStreamTest, test_aFewStrings) | |
Send a few short strings. Expect that c_str() returns the concatenation of those strings. More... | |
TEST_F (LogEntryStreamTest, test_aLotOfStrings) | |
Send a bunch of ints and strings. Expect that c_str() matches the result of sending the same to ostringstream. More... | |
TEST_F (LoggerTest, test_logDebug9Level) | |
TEST_F (LoggerTest, test_logDebug8Level) | |
TEST_F (LoggerTest, test_logDebug7Level) | |
TEST_F (LoggerTest, test_logDebug6Level) | |
TEST_F (LoggerTest, test_logDebug5Level) | |
TEST_F (LoggerTest, test_logDebug4Level) | |
TEST_F (LoggerTest, test_logDebug3Level) | |
TEST_F (LoggerTest, test_logDebug2Level) | |
TEST_F (LoggerTest, test_logDebug1Level) | |
TEST_F (LoggerTest, test_logDebug0Level) | |
TEST_F (LoggerTest, test_logInfoLevel) | |
TEST_F (LoggerTest, test_logWarnLevel) | |
TEST_F (LoggerTest, test_logErrorLevel) | |
TEST_F (LoggerTest, test_logCriticalLevel) | |
TEST_F (LoggerTest, test_logNoneLevel) | |
TEST_F (LoggerTest, test_moduleLoggerObserver) | |
TEST_F (LoggerTest, test_multipleModuleLoggerObservers) | |
Variables | |
static const long | SUCCESS_STATUS_CODE {200} |
A status code that represents success. More... | |
static const long | SUCCESS_PARTIAL_CONTENT_STATUS_CODE {206} |
A status code that represents partial content. More... | |
static const long | BAD_STATUS_CODE {0} |
A status code that represents failure. More... | |
static const std::string | TEST_CONTENT_TYPE {"unknown"} |
A content type. More... | |
static const std::string | TEST_SOURCE_STRING = "<The_Source_Of_Log_Entries>" |
String used to test that the source component is logged. More... | |
static const std::string | TEST_EVENT_STRING = "[Some_Event_Worth_Logging]" |
String used to test that the event component is logged. More... | |
static const std::string | UNESCAPED_METADATA_VALUE = R"(reserved_chars['\' ',' ':' '='])" |
Metadata value with characters that must be escaped, to exercise the code that escapes metadata values. More... | |
static std::shared_ptr< MockLogger > | g_log |
Global to hold on to the current MockLogger to use. More... | |
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | LogEntryStreamTest | , |
test_emptyStream | |||
) |
Test that a new LogEntryStream instance's c_str() returns an empty string.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | LogEntryStreamTest | , |
test_shortString | |||
) |
Send a character to an empty LogEntryStream. Expect that c_str() returns a string with just that character.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | LogEntryStreamTest | , |
test_mediumString | |||
) |
Send a medium sized string test to an empty LogEntryStream. Expect that c_str() returns a matching string.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | LogEntryStreamTest | , |
test_longString | |||
) |
Send a long string test to an empty LogEntryStream. Expect that c_str() returns a matching string.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | LogEntryStreamTest | , |
test_aFewStrings | |||
) |
Send a few short strings. Expect that c_str() returns the concatenation of those strings.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | HTTPContentTest | , |
test_readStatusCodeSuccess | |||
) |
Test that isStatusCodeSuccess returns true for SUCCESS_STATUS_CODE
.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | HTTPContentTest | , |
test_readStatusCodePartialContentSuccess | |||
) |
Test that isStatusCodeSuccess returns true for SUCCESS_PARTIAL_CONTENT_STATUS_CODE
.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | LogEntryStreamTest | , |
test_aLotOfStrings | |||
) |
Send a bunch of ints and strings. Expect that c_str() matches the result of sending the same to ostringstream.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | HTTPContentTest | , |
test_readStatusCodeNotSuccess | |||
) |
Test that isStatusCodeSuccess returns false for BAD_STATUS_CODE
.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | HTTPContentTest | , |
test_readStatusCodeMoreThanOnce | |||
) |
Test that we can use getStatusCode()
to get the status code after using isStatusCodeSuccess()
.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | HTTPContentTest | , |
test_readContentTypeMoreThanOnce | |||
) |
Test that we can use getContentType()
to get the status code after using isStatusCodeSuccess()
.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | HTTPContentTest | , |
test_getDataStream | |||
) |
Test that we can retrieve the attachment reader, even if it's nullptr.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | LoggerTest | , |
test_logDebug9Level | |||
) |
Test delivery of log messages when the log level is set to DEBUG9. This test sets the log level to DEBUG9 and then verifies that all logs (except those compiled off) are passed through to the emit() method.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | LoggerTest | , |
test_logDebug8Level | |||
) |
Test delivery of log messages when the log level is set to DEBUG8. This test sets the log level to DEBUG8 and then verifies that all logs (except those compiled off) are passed through to the emit() method.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | LoggerTest | , |
test_logDebug7Level | |||
) |
Test delivery of log messages when the log level is set to DEBUG7. This test sets the log level to DEBUG7 and then verifies that all logs (except those compiled off) are passed through to the emit() method.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | LoggerTest | , |
test_logDebug6Level | |||
) |
Test delivery of log messages when the log level is set to DEBUG6. This test sets the log level to DEBUG6 and then verifies that all logs (except those compiled off) are passed through to the emit() method.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | LoggerTest | , |
test_logDebug5Level | |||
) |
Test delivery of log messages when the log level is set to DEBUG5. This test sets the log level to DEBUG5 and then verifies that all logs (except those compiled off) are passed through to the emit() method.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | LoggerTest | , |
test_logDebug4Level | |||
) |
Test delivery of log messages when the log level is set to DEBUG4. This test sets the log level to DEBUG4 and then verifies that all logs (except those compiled off) are passed through to the emit() method.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | LoggerTest | , |
test_logDebug3Level | |||
) |
Test delivery of log messages when the log level is set to DEBUG3. This test sets the log level to DEBUG3 and then verifies that all logs (except those compiled off) are passed through to the emit() method.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | LoggerTest | , |
test_logDebug2Level | |||
) |
Test delivery of log messages when the log level is set to DEBUG2. This test sets the log level to DEBUG2 and then verifies that all logs (except those compiled off) are passed through to the emit() method.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | LoggerTest | , |
test_logDebug1Level | |||
) |
Test delivery of log messages when the log level is set to DEBUG1. This test sets the log level to DEBUG1 and then verifies that only logs of DEBUG or above are passed through to the emit() method.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | LoggerTest | , |
test_logDebug0Level | |||
) |
Test delivery of log messages when the log level is set to DEBUG1. This test sets the log level to DEBUG0 and then verifies that only logs of DEBUG or above are passed through to the emit() method.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | LoggerTest | , |
test_logInfoLevel | |||
) |
Test delivery of log messages when the log level is set to INFO. This test sets the log level to INFO and then verifies that only logs of INFO or above are passed through to the emit() method.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | LoggerTest | , |
test_logWarnLevel | |||
) |
Test delivery of log messages when the log level is set to WARN. This test sets the log level to WARN and then verifies that only logs of WARN or above are passed through to the emit() method.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | LoggerTest | , |
test_logErrorLevel | |||
) |
Test delivery of log messages when the log level is set to ERROR. This test sets the log level to ERROR and then verifies that only logs of ERROR or above are passed through to the emit() method.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | LoggerTest | , |
test_logCriticalLevel | |||
) |
Test delivery of log messages when the log level is set to CRITICAL. This test sets the log level to CRITICAL and then verifies that only CRITICAL logs are passed through to the emit() method.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | LoggerTest | , |
test_logNoneLevel | |||
) |
Test delivery of log messages when the log level is set to NONE. This test sets the log level to NONE and then verifies that no logs are passed through to the emit() method.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | LoggerTest | , |
test_moduleLoggerObserver | |||
) |
Test observer mechanism in the MockModuleLogger. Expects that when the logLevel changes for the sink, the callback of the MockModuleLogger is triggered. Also make sure any changes to MockModuleLogger's logLevel will override set log level of the MockModuleLogger and the MockModuleLogger will ignore further changes to the logLevel to the sink.
alexaClientSDK::avsCommon::utils::logger::test::TEST_F | ( | LoggerTest | , |
test_multipleModuleLoggerObservers | |||
) |
Test observer mechanism with multiple observers. Expects all observers to be notified of the logLevel change.
|
static |
A status code that represents failure.
|
static |
Global to hold on to the current MockLogger
to use.
|
static |
A status code that represents partial content.
|
static |
A status code that represents success.
|
static |
A content type.
|
static |
String used to test that the event component is logged.
|
static |
String used to test that the source component is logged.
|
static |
Metadata value with characters that must be escaped, to exercise the code that escapes metadata values.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0