AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | Public Attributes | List of all members
alexaClientSDK::avsCommon::avs::test::AttachmentReaderTest Class Reference
Inheritance diagram for alexaClientSDK::avsCommon::avs::test::AttachmentReaderTest:
Inheritance graph
Collaboration diagram for alexaClientSDK::avsCommon::avs::test::AttachmentReaderTest:
Collaboration graph

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)
- Public Member Functions inherited from testing::Test
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< InProcessSDSm_sds
 The commonly used SDS in these tests. More...
std::unique_ptr< InProcessAttachmentReaderm_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

- Public Types inherited from testing::Test
typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc
typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc
- Static Public Member Functions inherited from testing::Test
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)
- Protected Member Functions inherited from testing::Test
 Test ()
virtual void SetUp ()
virtual void TearDown ()

Detailed Description

A class which helps drive this unit test suite.

Constructor & Destructor Documentation

◆ AttachmentReaderTest()

alexaClientSDK::avsCommon::avs::test::AttachmentReaderTest::AttachmentReaderTest ( )


Member Function Documentation

◆ init()

void alexaClientSDK::avsCommon::avs::test::AttachmentReaderTest::init ( bool  createReader = true,
bool  resetOnOverrun = false 

Initialization function to set up and test the class members.

createReaderWhether the reader data member should be constructed from m_sds.
resetOnOverrunWhether to create InProcessAttachmentReader with resetOnOverrun policy or not.

◆ readAndVerifyResult()

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.

readerThe reader with which to read data.
resultSizeThe size of the data the reader should read.
dataOffsetThe offset into the pattern which is being read from.

◆ testMultipleReads()

void alexaClientSDK::avsCommon::avs::test::AttachmentReaderTest::testMultipleReads ( bool  closeWriterBeforeReading)

Utility function to test multiple reads from an SDS.

closeWriterBeforeReadingAllows the writer to be closed before the reader performs its multiple reads.

Member Data Documentation

◆ m_reader

std::unique_ptr<InProcessAttachmentReader> alexaClientSDK::avsCommon::avs::test::AttachmentReaderTest::m_reader

The commonly used reader in these tests.

◆ m_readerPolicy

ReaderPolicy alexaClientSDK::avsCommon::avs::test::AttachmentReaderTest::m_readerPolicy

The commonly used AttachmentReader policy.

◆ m_sds

std::shared_ptr<InProcessSDS> alexaClientSDK::avsCommon::avs::test::AttachmentReaderTest::m_sds

The commonly used SDS in these tests.

◆ m_testPattern

std::vector<uint8_t> alexaClientSDK::avsCommon::avs::test::AttachmentReaderTest::m_testPattern

The commonly used test pattern in these tests.

◆ m_writer

std::unique_ptr<InProcessSDS::Writer> alexaClientSDK::avsCommon::avs::test::AttachmentReaderTest::m_writer

The commonly used writer in these tests.

◆ m_writerPolicy

InProcessSDS::Writer::Policy alexaClientSDK::avsCommon::avs::test::AttachmentReaderTest::m_writerPolicy

The commonly used SDSWriter policy.

The documentation for this class was generated from the following file:

AlexaClientSDK 3.0.0 - Copyright 2016-2022, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0