![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Public Member Functions | |
AttachmentReaderTest () | |
void | init (bool createReader=true, bool resetOnOverrun=false) |
void | testMultipleReads (bool closeWriterBeforeReading) |
void | readAndVerifyResult (std::shared_ptr< InProcessAttachmentReader > reader, size_t resultSize, size_t dataOffset=0) |
![]() | |
virtual | ~Test () |
Public Attributes | |
ReaderPolicy | m_readerPolicy |
The commonly used AttachmentReader policy. More... | |
InProcessSDS::Writer::Policy | m_writerPolicy |
The commonly used SDSWriter policy. More... | |
std::shared_ptr< InProcessSDS > | m_sds |
The commonly used SDS in these tests. More... | |
std::unique_ptr< InProcessAttachmentReader > | m_reader |
The commonly used reader in these tests. More... | |
std::unique_ptr< InProcessSDS::Writer > | m_writer |
The commonly used writer in these tests. More... | |
std::vector< uint8_t > | m_testPattern |
The commonly used test pattern in these tests. More... | |
Additional Inherited Members | |
![]() | |
typedef internal::SetUpTestCaseFunc | SetUpTestCaseFunc |
typedef internal::TearDownTestCaseFunc | TearDownTestCaseFunc |
![]() | |
static void | SetUpTestCase () |
static void | TearDownTestCase () |
static bool | HasFatalFailure () |
static bool | HasNonfatalFailure () |
static bool | HasFailure () |
static void | RecordProperty (const std::string &key, const std::string &value) |
static void | RecordProperty (const std::string &key, int value) |
![]() | |
Test () | |
virtual void | SetUp () |
virtual void | TearDown () |
A class which helps drive this unit test suite.
|
inline |
Constructor.
void alexaClientSDK::avsCommon::avs::test::AttachmentReaderTest::init | ( | bool | createReader = true , |
bool | resetOnOverrun = false |
||
) |
Initialization function to set up and test the class members.
createReader | Whether the reader data member should be constructed from m_sds. |
resetOnOverrun | Whether to create InProcessAttachmentReader with resetOnOverrun policy or not. |
void alexaClientSDK::avsCommon::avs::test::AttachmentReaderTest::readAndVerifyResult | ( | std::shared_ptr< InProcessAttachmentReader > | reader, |
size_t | resultSize, | ||
size_t | dataOffset = 0 |
||
) |
Utility function to read data from an SDS and verify its results againts m_pattern.
reader | The reader with which to read data. |
resultSize | The size of the data the reader should read. |
dataOffset | The offset into the pattern which is being read from. |
void alexaClientSDK::avsCommon::avs::test::AttachmentReaderTest::testMultipleReads | ( | bool | closeWriterBeforeReading | ) |
Utility function to test multiple reads from an SDS.
closeWriterBeforeReading | Allows the writer to be closed before the reader performs its multiple reads. |
std::unique_ptr<InProcessAttachmentReader> alexaClientSDK::avsCommon::avs::test::AttachmentReaderTest::m_reader |
The commonly used reader in these tests.
ReaderPolicy alexaClientSDK::avsCommon::avs::test::AttachmentReaderTest::m_readerPolicy |
The commonly used AttachmentReader policy.
std::shared_ptr<InProcessSDS> alexaClientSDK::avsCommon::avs::test::AttachmentReaderTest::m_sds |
The commonly used SDS in these tests.
std::vector<uint8_t> alexaClientSDK::avsCommon::avs::test::AttachmentReaderTest::m_testPattern |
The commonly used test pattern in these tests.
std::unique_ptr<InProcessSDS::Writer> alexaClientSDK::avsCommon::avs::test::AttachmentReaderTest::m_writer |
The commonly used writer in these tests.
InProcessSDS::Writer::Policy alexaClientSDK::avsCommon::avs::test::AttachmentReaderTest::m_writerPolicy |
The commonly used SDSWriter policy.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0