AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Typedefs | Functions | Variables
alexaClientSDK::acsdkAudioPlayer::test Namespace Reference

Classes

class  AudioPlayerTest
 
class  MockAudioPlayerObserver
 
class  MockContext
 
class  ProgressTimerTest
 
class  TestAudioPlayerObserver
 
class  UtilTestRealCryptoFactoryFixture
 

Typedefs

using MediaPlayerState = avsCommon::utils::mediaPlayer::MediaPlayerState
 

Functions

static std::chrono::milliseconds MY_WAIT_TIMEOUT (1500)
 Plenty of time for a test to complete. More...
 
static std::chrono::milliseconds EVENT_PROCESS_DELAY (20)
 
static const std::string CHANNEL_NAME (avsCommon::sdkInterfaces::FocusManagerInterface::CONTENT_CHANNEL_NAME)
 The name of the FocusManager channel used by the AudioPlayer. More...
 
static const std::string NAMESPACE_AUDIO_PLAYER ("AudioPlayer")
 Namespace for AudioPlayer. More...
 
static const std::string NAMESPACE_AUDIO_PLAYER_2 ("AudioPlayer_2")
 Namespace for Another AudioPlayer. More...
 
static const std::string NAME_PLAY ("Play")
 Name for AudioPlayer Play directive. More...
 
static const std::string NAME_STOP ("Stop")
 Name for AudioPlayer Stop directive. More...
 
static const std::string NAME_CLEARQUEUE ("ClearQueue")
 Name for AudioPlayer ClearQueue directive. More...
 
static const std::string NAME_UPDATE_PROGRESS_REPORT_INTERVAL ("UpdateProgressReportInterval")
 Name for AudioPlayer UpdateProgressReportInterval directive. More...
 
static const std::string MESSAGE_ID_TEST ("MessageId_Test")
 Message Id for testing. More...
 
static const std::string MESSAGE_ID_TEST_2 ("MessageId_Test2")
 Another message Id for testing. More...
 
static const std::string MESSAGE_ID_TEST_3 ("MessageId_Test3")
 Another message Id for testing. More...
 
static const std::string PLAY_REQUEST_ID_TEST ("PlayRequestId_Test")
 PlayRequestId for testing. More...
 
static const std::string CONTEXT_ID_TEST ("ContextId_Test")
 Context ID for testing. More...
 
static const std::string CONTEXT_ID_TEST_2 ("ContextId_Test2")
 Context ID for testing. More...
 
static const std::string CONTEXT_ID_TEST_3 ("ContextId_Test3")
 Context ID for testing. More...
 
static const std::string TOKEN_TEST ("Token_Test")
 Token for testing. More...
 
static const std::string PREV_TOKEN_TEST ("Prev_Token_Test")
 Previous token for testing. More...
 
static const std::string FORMAT_TEST ("AUDIO_MPEG")
 Format of the audio. More...
 
static const std::string URL_TEST ("cid:Test")
 URL for testing. More...
 
static const std::string NAME_ENQUEUE ("ENQUEUE")
 ENQUEUE playBehavior. More...
 
static const std::string NAME_REPLACE_ALL ("REPLACE_ALL")
 REPLACE_ALL playBehavior. More...
 
static const std::string NAME_CLEAR_ALL ("CLEAR_ALL")
 CLEAR_ALL clearBehavior. More...
 
static const std::string NAME_CLEAR_ENQUEUED ("CLEAR_ENQUEUED")
 CLEAR_ENQUEUED clearBehavior. More...
 
static const std::string AUDIO_ITEM_ID_1 ("testID1")
 audioItemId for testing. More...
 
static const std::string AUDIO_ITEM_ID_2 ("testID2")
 
static const std::string FINISHED_STATE ("FINISHED")
 The FINISHED state of the AudioPlayer. More...
 
static const std::string EXPIRY_TEST ("481516234248151623421088")
 ExpiryTime for testing. Needs to be in ISO 8601 format. More...
 
static std::string createEnqueuePayloadTest (long offsetInMilliseconds, const std::string &audioId=AUDIO_ITEM_ID_1)
 Payloads for testing. More...
 
static std::string createReplaceAllPayloadTest (long offsetInMilliseconds, const std::string &audioId=AUDIO_ITEM_ID_1)
 
static std::string createPayloadWithEndOffset (long offset, long endOffset, const std::string &audioId=AUDIO_ITEM_ID_1)
 
static const std::string TAG ("AudioPlayerTest")
 String to identify log entries originating from this file. More...
 
 TEST_F (AudioPlayerTest, test_createWithNullPointers)
 
 TEST_F (AudioPlayerTest, test_transitionFromIdleToPlaying)
 
 TEST_F (AudioPlayerTest, test_transitionFromPlayingToStopped)
 
 TEST_F (AudioPlayerTest, test_transitionFromPlayingToStoppedToIdleWithClearAll)
 
 TEST_F (AudioPlayerTest, test_continuesPlayingWithClearEnqueued)
 
 TEST_F (AudioPlayerTest, test_transitionFromIdleToPlayingAfterClearAll)
 
 TEST_F (AudioPlayerTest, testTransitionFromIdleToResumePlaying)
 
 TEST_F (AudioPlayerTest, testTransitionFromPlayingToPlayingNextEnqueuedTrack)
 
 TEST_F (AudioPlayerTest, testTransitionDontPlayEnqueuedTrackIfOffsetDifferent)
 
 TEST_F (AudioPlayerTest, test_transitionFromPlayingToPaused)
 
 TEST_F (AudioPlayerTest, test_localPause_withEnqueuedTracks_doesNotAutoProgress)
 
 TEST_F (AudioPlayerTest, test_transitionFromPausedToStopped)
 
 TEST_F (AudioPlayerTest, test_transitionFromPausedToIdle)
 
 TEST_F (AudioPlayerTest, test_resumeAfterPaused)
 
 TEST_F (AudioPlayerTest, test_callingProvideStateWhenIdle)
 
 TEST_F (AudioPlayerTest, test_onPlaybackError)
 
 TEST_F (AudioPlayerTest, test_onPlaybackError_Stopped)
 
 TEST_F (AudioPlayerTest, testPrebufferOnPlaybackError)
 
 TEST_F (AudioPlayerTest, test_onPlaybackPaused)
 
 TEST_F (AudioPlayerTest, test_onPlaybackResumed)
 
 TEST_F (AudioPlayerTest, test_onPlaybackFinished_bufferCompleteAfterStarted)
 
 TEST_F (AudioPlayerTest, test_onPlaybackFinished_bufferCompleteBeforeStarted)
 
 TEST_F (AudioPlayerTest, testOnPlaybackFinishedWithPlaybackAttributes)
 
 TEST_F (AudioPlayerTest, testOnPlaybackStoppedWithPlaybackReports)
 
 TEST_F (AudioPlayerTest, test_onBufferUnderrun)
 
 TEST_F (AudioPlayerTest, testTimer_onBufferRefilled)
 
 TEST_F (AudioPlayerTest, test_onTags_filteredOut)
 
 TEST_F (AudioPlayerTest, test_onTags_filteredIn)
 
 TEST_F (AudioPlayerTest, test_onTags_filteredIn_rateCheck)
 
 TEST_F (AudioPlayerTest, test_onTags_filteredIn_duplicateCheck)
 
 TEST_F (AudioPlayerTest, test_cancelDirective)
 
 TEST_F (AudioPlayerTest, test_focusChangeToNoneInIdleState)
 
 TEST_F (AudioPlayerTest, test_focusChangeFromForegroundToBackgroundInIdleState)
 
 TEST_F (AudioPlayerTest, test_focusChangeFromNoneToBackgroundInIdleState)
 
 TEST_F (AudioPlayerTest, test_focusChangesInPlayingState)
 
 TEST_F (AudioPlayerTest, test_focusChangesInStoppedState)
 
 TEST_F (AudioPlayerTest, test_focusChangesInPausedState)
 
 TEST_F (AudioPlayerTest, test_focusChangesInBufferUnderrunState)
 
 TEST_F (AudioPlayerTest, test_focusChangeToBackgroundBeforeOnPlaybackStarted)
 
 TEST_F (AudioPlayerTest, test_playAfterOnPlaybackError)
 
 TEST_F (AudioPlayerTest, test_playCallsCaptionManager)
 
 TEST_F (AudioPlayerTest, test_playParsesCaptionPayload)
 
 TEST_F (AudioPlayerTest, test_playbackStartedSwitchesHandler)
 
 TEST_F (AudioPlayerTest, test_progressReportDelayElapsed)
 
 TEST_F (AudioPlayerTest, test_progressReportDelayElapsedDelayLessThanOffset)
 
 TEST_F (AudioPlayerTest, testTimer_progressReportIntervalElapsed)
 
 TEST_F (AudioPlayerTest, test_progressReportIntervalElapsedIntervalLessThanOffset)
 
 TEST_F (AudioPlayerTest, testSlow_playOnlyAfterForegroundFocus)
 
 TEST_F (AudioPlayerTest, testSlow_focusChangeRaceOnPlay)
 
 TEST_F (AudioPlayerTest, testTimer_playbackStartedCallbackAfterFocusLost)
 
 TEST_F (AudioPlayerTest, test1PlayerPool_PlayEnqueueFinishPlay)
 
 TEST_F (AudioPlayerTest, test2PlayerPool_PlayEnqueueFinishPlay)
 
 TEST_F (AudioPlayerTest, test3PlayerPool_PlayEnqueueFinishPlay)
 
 TEST_F (AudioPlayerTest, testPlayRequestor)
 
 TEST_F (AudioPlayerTest, testUpdateProgressReportInterval)
 
 TEST_F (AudioPlayerTest, testTimer_playbackFinishedMessageOrder_1Player)
 
 TEST_F (AudioPlayerTest, testTimer_playbackFinishedMessageOrder_2Players)
 
 TEST_F (AudioPlayerTest, testTimer_playbackValidateReportEvents_1Player)
 
 TEST_F (AudioPlayerTest, testTimer_playbackValidateFailed_1Player)
 
 TEST_F (AudioPlayerTest, testTimer_playbackValidateStutter_1Player)
 
 TEST_F (AudioPlayerTest, testTimer_playbackPauseResume_1Player)
 
 TEST_F (AudioPlayerTest, test_publishedCapabiltiesContainsFingerprint)
 
 TEST_F (AudioPlayerTest, test_localStop)
 
 TEST_F (AudioPlayerTest, test_localPause)
 
 TEST_F (AudioPlayerTest, test_localResumeAfterPaused)
 
 TEST_F (AudioPlayerTest, test_localSeekTo)
 
 TEST_F (AudioPlayerTest, test_localSeekToWhileLocalStopped)
 
 TEST_F (AudioPlayerTest, DISABLED_test_endOffset)
 
 TEST_F (AudioPlayerTest, test_badEndOffset)
 
 TEST_F (AudioPlayerTest, test_badEndOffsetEqualValue)
 
static void verifyOffset (std::chrono::milliseconds expected, std::chrono::milliseconds received)
 
 TEST_F (ProgressTimerTest, test_noDelayOrInterval)
 
 TEST_F (ProgressTimerTest, test_zeroInterval)
 
 TEST_F (ProgressTimerTest, test_justDelay)
 
 TEST_F (ProgressTimerTest, test_justInterval)
 
 TEST_F (ProgressTimerTest, test_delayAndInterval)
 
 TEST_F (ProgressTimerTest, test_pause)
 
 TEST_F (ProgressTimerTest, test_resumeDoesNotRepeat)
 
 TEST_F (ProgressTimerTest, testTimer_offsets)
 
 TEST_F (ProgressTimerTest, test_delayAndIntervalCoincide)
 
 TEST_F (ProgressTimerTest, test_updateInterval)
 
 TEST_F (ProgressTimerTest, test_updateIntervalAfterStop)
 
 TEST_P (UtilTestRealCryptoFactoryFixture, test_generateMD5Hash)
 
 INSTANTIATE_TEST_CASE_P (Parameterized, UtilTestRealCryptoFactoryFixture, ::testing::Values(UtilsTestData(TEST_STR, MD5_TEST_DATA_HEX), UtilsTestData(TEST_STR_2, MD5_TEST_DATA_2_HEX), UtilsTestData(TEST_STR_3, MD5_TEST_DATA_3_HEX)))
 

Variables

static const MediaPlayerState DEFAULT_MEDIA_PLAYER_STATE = {std::chrono::milliseconds(0)}
 Default media player state for reporting all playback offsets. More...
 
static const NamespaceAndName NAMESPACE_AND_NAME_PLAYBACK_STATE {NAMESPACE_AUDIO_PLAYER, "PlaybackState"}
 The NamespaceAndName to send to the ContextManager. More...
 
static const std::string PLAYING_STATE {"PLAYING"}
 The PLAYING state of the AudioPlayer. More...
 
static const std::string IDLE_STATE {"IDLE"}
 The IDLE state of the AudioPlayer. More...
 
static const long OFFSET_IN_MILLISECONDS_TEST {100}
 The offset in milliseconds returned by the mock media player. More...
 
static const long OFFSET_IN_MILLISECONDS_TEST2 {0}
 The offset in milliseconds returned by the mock media player. More...
 
static const long PROGRESS_REPORT_DELAY {200}
 progressReportDelayInMilliseconds for testing. More...
 
static const long PROGRESS_REPORT_INTERVAL {100}
 progressReportIntervalInMilliseconds for testing. More...
 
static const long OFFSET_IN_MILLISECONDS_BEFORE_PROGRESS_REPORT_DELAY {PROGRESS_REPORT_DELAY - 1}
 The offset in milliseconds returned by the mock media player slightly before the progressReportDelayInMilliseconds. More...
 
static const long OFFSET_IN_MILLISECONDS_AFTER_PROGRESS_REPORT_DELAY {PROGRESS_REPORT_DELAY + 1}
 The offset in milliseconds returned by the mock media player slightly before the progressReportDelayInMilliseconds. More...
 
static const long OFFSET_IN_MILLISECONDS_BEFORE_PROGRESS_REPORT_INTERVAL {PROGRESS_REPORT_INTERVAL - 1}
 
static const long OFFSET_IN_MILLISECONDS_AFTER_PROGRESS_REPORT_INTERVAL {PROGRESS_REPORT_INTERVAL + 1}
 
static const std::chrono::milliseconds TIME_FOR_TWO_AND_A_HALF_INTERVAL_PERIODS
 The time that must elapse in order to get 2.5 interval periods. More...
 
static const long METADATA_EVENT_DELAY {1001}
 The time to wait before sending 'onTags()' after the last send. More...
 
static const std::string CAPTION_CONTENT_SAMPLE
 
static const std::string PLAY_REQUESTOR_TYPE_ALERT {"ALERT"}
 A playRequestor object with type "ALERT". More...
 
static const std::string PLAY_REQUESTOR_ID {"12345678"}
 A playRequestor object id. More...
 
static const std::string REPLACE_ALL_PAYLOAD_TEST
 
static const std::string PLAY_REQUESTOR_PAYLOAD_TEST
 
static const std::string EMPTY_PAYLOAD_TEST = "{}"
 Empty payload for testing. More...
 
static const std::string CLEAR_ALL_PAYLOAD_TEST
 CLEAR_ALL payload for testing. More...
 
static const std::string CLEAR_ENQUEUED_PAYLOAD_TEST
 CLEAR_ENQUEUED payload for testing. More...
 
static const std::string TOKEN_KEY = "token"
 Token JSON key. More...
 
static const std::string OFFSET_KEY = "offsetInMilliseconds"
 Offset JSON key. More...
 
static const std::string SEEK_END_OFFSET_KEY = "seekEndOffsetInMilliseconds"
 Offset JSON key. More...
 
static const std::string ACTIVITY_KEY = "playerActivity"
 Player activity JSON key. More...
 
static const std::string IDLE_STATE_TEST
 The expected state when the AudioPlayer is not handling any directive. More...
 
static const unsigned int PROVIDE_STATE_TOKEN_TEST {1}
 Provide State Token for testing. More...
 
static const std::string UPDATE_PROGRESS_REPORT_INTERVAL_PAYLOAD_TEST
 UPDATE_PROGRESS_REPORT_INTERVAL payload for testing. More...
 
static const std::string MESSAGE_EVENT_KEY = "event"
 JSON key for the event section of a message. More...
 
static const std::string MESSAGE_HEADER_KEY = "header"
 JSON key for the header section of a message. More...
 
static const std::string MESSAGE_NAME_KEY = "name"
 JSON key for the name section of a message. More...
 
static const std::string MESSAGE_TOKEN_KEY = "token"
 JSON key for the token section of a message. More...
 
static const std::string MESSAGE_PAYLOAD_KEY = "payload"
 JSON key for the payload section of a message. More...
 
static const std::string MESSAGE_METADATA_KEY = "metadata"
 JSON key for the metadata section of a message. More...
 
static const std::string MESSAGE_METADATA_STRING_KEY = "StringKey"
 JSON key for "string" type field in metadata section of StreamMetadataExtracted event. More...
 
static const std::string MESSAGE_METADATA_STRING_KEY_WL = "Title"
 JSON key for "string" type field in metadata section of StreamMetadataExtracted event. On allowlist. More...
 
static const std::string MESSAGE_METADATA_STRING_VALUE = "StringValue"
 JSON value for "string" type field in metadata section of StreamMetadataExtracted event. More...
 
static const std::string MESSAGE_METADATA_STRING_VALUE_ALT = "StringValue2"
 JSON value for alternate "string" type field in metadata section of StreamMetadataExtracted event. More...
 
static const std::string MESSAGE_METADATA_UINT_KEY = "UintKey"
 JSON key for "uint" type field in metadata section of StreamMetadataExtracted event. More...
 
static const std::string MESSAGE_METADATA_UINT_VALUE = "12345"
 JSON value for "uint" type field in metadata section of StreamMetadataExtracted event. More...
 
static const std::string MESSAGE_METADATA_INT_KEY = "IntKey"
 JSON key for "int" type field in metadata section of StreamMetadataExtracted event. More...
 
static const std::string MESSAGE_METADATA_INT_VALUE = "67890"
 JSON value for "int" type field in metadata section of StreamMetadataExtracted event. More...
 
static const std::string MESSAGE_METADATA_DOUBLE_KEY = "DoubleKey"
 JSON key for "double" type field in metadata section of StreamMetadataExtracted event. More...
 
static const std::string MESSAGE_METADATA_DOUBLE_VALUE = "3.14"
 JSON value for "double" type field in metadata section of StreamMetadataExtracted event. More...
 
static const std::string MESSAGE_METADATA_BOOLEAN_KEY = "BooleanKey"
 JSON key for "boolean" type field in metadata section of StreamMetadataExtracted event. More...
 
static const std::string MESSAGE_METADATA_BOOLEAN_VALUE = "true"
 JSON value for "boolean" type field in metadata section of StreamMetadataExtracted event. More...
 
static const std::string MESSAGE_PLAYBACK_ATTRIBUTES_KEY = "playbackAttributes"
 JSON key for the playbackAttributes section of a message. More...
 
static const std::string MESSAGE_PLAYBACK_ATTRIBUTES_NAME_KEY = "name"
 JSON key for "name" field in playbackAttributes section of message. More...
 
static const std::string MESSAGE_PLAYBACK_ATTRIBUTES_NAME_VALUE = "STREAM_NAME_ABSENT"
 JSON value for "name" field in playbackAttributes section of message. More...
 
static const std::string MESSAGE_PLAYBACK_ATTRIBUTES_CODEC_KEY = "codec"
 JSON key for "codec" field in playbackAttributes section of message. More...
 
static const std::string MESSAGE_PLAYBACK_ATTRIBUTES_CODEC_VALUE = "opus"
 JSON value for "codec" field in playbackAttributes section of message. More...
 
static const std::string MESSAGE_PLAYBACK_ATTRIBUTES_SAMPLING_RATE_KEY = "samplingRateInHertz"
 JSON key for "samplingRateInHertz" field in playbackAttributes section of message. More...
 
static const long MESSAGE_PLAYBACK_ATTRIBUTES_SAMPLING_RATE_VALUE = 48000
 JSON value for "samplingRateInHertz" field in playbackAttributes section of message. More...
 
static const std::string MESSAGE_PLAYBACK_ATTRIBUTES_BITRATE_KEY = "dataRateInBitsPerSecond"
 JSON key for "dataRateInBitsPerSecond" field in playbackAttributes section of message. More...
 
static const long MESSAGE_PLAYBACK_ATTRIBUTES_BITRATE_VALUE = 49000
 JSON value for "dataRateInBitsPerSecond" field in playbackAttributes section of message. More...
 
static const std::string MESSAGE_PLAYBACK_REPORTS_KEY = "playbackReports"
 JSON key for the playbackReports section of a message. More...
 
static const std::string MESSAGE_PLAYBACK_REPORTS_START_OFFSET_KEY = "startOffsetInMilliseconds"
 JSON key for "startOffsetInMilliseconds" field in playbackReports section of message. More...
 
static const long MESSAGE_PLAYBACK_REPORTS_START_OFFSET_VALUE = 0
 JSON value for "startOffsetInMilliseconds" field in playbackReports section of message. More...
 
static const std::string MESSAGE_PLAYBACK_REPORTS_END_OFFSET_KEY = "endOffsetInMilliseconds"
 JSON key for "endOffsetInMilliseconds" field in playbackReports section of message. More...
 
static const long MESSAGE_PLAYBACK_REPORTS_END_OFFSET_VALUE = 10000
 JSON value for "endOffsetInMilliseconds" field in playbackReports section of message. More...
 
static const std::string PLAYBACK_STARTED_NAME = "PlaybackStarted"
 Name of PlaybackStarted event. More...
 
static const std::string PLAYBACK_NEARLY_FINISHED_NAME = "PlaybackNearlyFinished"
 Name of PlaybackNearlyFinished event. More...
 
static const std::string PLAYBACK_FINISHED_NAME = "PlaybackFinished"
 Name of PlaybackFinished event. More...
 
static const std::string PLAYBACK_STOPPED_NAME = "PlaybackStopped"
 Name of PlaybackStopped event. More...
 
static const std::string PLAYBACK_PAUSED_NAME = "PlaybackPaused"
 Name of PlaybackPaused event. More...
 
static const std::string PLAYBACK_FAILED_NAME = "PlaybackFailed"
 Name of PlaybackFailed event. More...
 
static const std::string PLAYBACK_RESUMED_NAME = "PlaybackResumed"
 Name of PlaybackResumed event. More...
 
static const std::string PLAYBACK_STUTTER_STARTED_NAME = "PlaybackStutterStarted"
 Name of PlaybackStutterStarted event. More...
 
static const std::string PLAYBACK_STUTTER_FINISHED_NAME = "PlaybackStutterFinished"
 Name of PlaybackStutterFinished event. More...
 
static const std::string PROGRESS_REPORT_DELAY_ELAPSED_NAME = "ProgressReportDelayElapsed"
 Name of ProgressReportDelayElapsed event. More...
 
static const std::string PROGRESS_REPORT_INTERVAL_ELAPSED_NAME = "ProgressReportIntervalElapsed"
 Name of ProgressReportIntervalElapsed event. More...
 
static const std::string PROGRESS_REPORT_INTERVAL_UPDATED_NAME = "ProgressReportIntervalUpdated"
 Name of ProgressReportIntervalUpdated event. More...
 
static const std::string STREAM_METADATA_EXTRACTED_NAME = "StreamMetadataExtracted"
 Name of StreamMetadataExtracted event. More...
 
static const std::string SEEK_COMPLETE_NAME = "PlaybackSeeked"
 Name of SeekComplete event. More...
 
static const Fingerprint FINGERPRINT = {"com.audioplayer.test", "DEBUG", "0001"}
 Fingerprint for media player. More...
 
static const std::string FINGERPRINT_KEY = "fingerprint"
 Key for "fingerprint" in AudioPlayer configurations. More...
 
static const std::string FINGERPRINT_PACKAGE_KEY = "package"
 JSON key for "package" in fingerprint configuration. More...
 
static const std::string FINGERPRINT_BUILD_TYPE_KEY = "buildType"
 JSON key for "buildType" in fingerprint configuration. More...
 
static const std::string FINGERPRINT_VERSION_NUMBER_KEY = "versionNumber"
 JSON key for "versionNumber" in fingerprint configuration. More...
 
static const std::vector< std::string > EVENTS_WITH_REPORTS
 List of event messages expected to have PlaybackReports field. More...
 
static const std::chrono::milliseconds MILLIS_10 {10}
 10 millisecond delay or interval value. More...
 
static const std::chrono::milliseconds MILLIS_25 {25}
 25 millisecond delay or interval value (something not an interval of MILLIS_10). More...
 
static const std::chrono::milliseconds MILLIS_100 {100}
 100 millisecond duration to allow ProgressTimer to misbehave. More...
 
static const std::chrono::seconds FAIL_TIMEOUT {5}
 5 second timer to allow plenty of time for expected behaviors to be detected. More...
 
static const std::chrono::milliseconds OFFSET_TEST_DELAY {300}
 Delay value to use for test to verify offsets. More...
 
static const std::chrono::milliseconds OFFSET_TEST_INTERVAL {500}
 Interval value to use for test to verify offsets. More...
 
static const std::chrono::milliseconds LOWER_ERROR {100}
 Amount an offset can be less than expected and still be acceptable. More...
 
static const std::chrono::milliseconds UPPER_ERROR {200}
 Amount an offset can be greater than expected and still be acceptable. More...
 

Typedef Documentation

◆ MediaPlayerState

Function Documentation

◆ AUDIO_ITEM_ID_1()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::AUDIO_ITEM_ID_1 ( "testID1"  )
static

audioItemId for testing.

◆ AUDIO_ITEM_ID_2()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::AUDIO_ITEM_ID_2 ( "testID2"  )
static

◆ CHANNEL_NAME()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::CHANNEL_NAME ( avsCommon::sdkInterfaces::FocusManagerInterface::CONTENT_CHANNEL_NAME  )
static

The name of the FocusManager channel used by the AudioPlayer.

◆ CONTEXT_ID_TEST()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::CONTEXT_ID_TEST ( "ContextId_Test"  )
static

Context ID for testing.

◆ CONTEXT_ID_TEST_2()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::CONTEXT_ID_TEST_2 ( "ContextId_Test2"  )
static

Context ID for testing.

◆ CONTEXT_ID_TEST_3()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::CONTEXT_ID_TEST_3 ( "ContextId_Test3"  )
static

Context ID for testing.

◆ createEnqueuePayloadTest()

static std::string alexaClientSDK::acsdkAudioPlayer::test::createEnqueuePayloadTest ( long  offsetInMilliseconds,
const std::string &  audioId = AUDIO_ITEM_ID_1 
)
static

Payloads for testing.

◆ createPayloadWithEndOffset()

static std::string alexaClientSDK::acsdkAudioPlayer::test::createPayloadWithEndOffset ( long  offset,
long  endOffset,
const std::string &  audioId = AUDIO_ITEM_ID_1 
)
static

◆ createReplaceAllPayloadTest()

static std::string alexaClientSDK::acsdkAudioPlayer::test::createReplaceAllPayloadTest ( long  offsetInMilliseconds,
const std::string &  audioId = AUDIO_ITEM_ID_1 
)
static

◆ EVENT_PROCESS_DELAY()

static std::chrono::milliseconds alexaClientSDK::acsdkAudioPlayer::test::EVENT_PROCESS_DELAY ( 20  )
static

◆ EXPIRY_TEST()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::EXPIRY_TEST ( "481516234248151623421088"  )
static

ExpiryTime for testing. Needs to be in ISO 8601 format.

◆ FINISHED_STATE()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::FINISHED_STATE ( "FINISHED"  )
static

The FINISHED state of the AudioPlayer.

◆ FORMAT_TEST()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::FORMAT_TEST ( "AUDIO_MPEG"  )
static

Format of the audio.

◆ INSTANTIATE_TEST_CASE_P()

alexaClientSDK::acsdkAudioPlayer::test::INSTANTIATE_TEST_CASE_P ( Parameterized  ,
UtilTestRealCryptoFactoryFixture  ,
::testing::Values(UtilsTestData(TEST_STR, MD5_TEST_DATA_HEX), UtilsTestData(TEST_STR_2, MD5_TEST_DATA_2_HEX), UtilsTestData(TEST_STR_3, MD5_TEST_DATA_3_HEX))   
)

◆ MESSAGE_ID_TEST()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_ID_TEST ( "MessageId_Test"  )
static

Message Id for testing.

◆ MESSAGE_ID_TEST_2()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_ID_TEST_2 ( "MessageId_Test2"  )
static

Another message Id for testing.

◆ MESSAGE_ID_TEST_3()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_ID_TEST_3 ( "MessageId_Test3"  )
static

Another message Id for testing.

◆ MY_WAIT_TIMEOUT()

static std::chrono::milliseconds alexaClientSDK::acsdkAudioPlayer::test::MY_WAIT_TIMEOUT ( 1500  )
static

Plenty of time for a test to complete.

◆ NAME_CLEAR_ALL()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::NAME_CLEAR_ALL ( "CLEAR_ALL"  )
static

CLEAR_ALL clearBehavior.

◆ NAME_CLEAR_ENQUEUED()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::NAME_CLEAR_ENQUEUED ( "CLEAR_ENQUEUED"  )
static

CLEAR_ENQUEUED clearBehavior.

◆ NAME_CLEARQUEUE()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::NAME_CLEARQUEUE ( "ClearQueue"  )
static

Name for AudioPlayer ClearQueue directive.

◆ NAME_ENQUEUE()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::NAME_ENQUEUE ( "ENQUEUE"  )
static

ENQUEUE playBehavior.

◆ NAME_PLAY()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::NAME_PLAY ( "Play"  )
static

Name for AudioPlayer Play directive.

◆ NAME_REPLACE_ALL()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::NAME_REPLACE_ALL ( "REPLACE_ALL"  )
static

REPLACE_ALL playBehavior.

◆ NAME_STOP()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::NAME_STOP ( "Stop"  )
static

Name for AudioPlayer Stop directive.

◆ NAME_UPDATE_PROGRESS_REPORT_INTERVAL()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::NAME_UPDATE_PROGRESS_REPORT_INTERVAL ( "UpdateProgressReportInterval"  )
static

Name for AudioPlayer UpdateProgressReportInterval directive.

◆ NAMESPACE_AUDIO_PLAYER()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::NAMESPACE_AUDIO_PLAYER ( "AudioPlayer"  )
static

Namespace for AudioPlayer.

◆ NAMESPACE_AUDIO_PLAYER_2()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::NAMESPACE_AUDIO_PLAYER_2 ( "AudioPlayer_2"  )
static

Namespace for Another AudioPlayer.

◆ PLAY_REQUEST_ID_TEST()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::PLAY_REQUEST_ID_TEST ( "PlayRequestId_Test"  )
static

PlayRequestId for testing.

◆ PREV_TOKEN_TEST()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::PREV_TOKEN_TEST ( "Prev_Token_Test"  )
static

Previous token for testing.

◆ TAG()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::TAG ( "AudioPlayerTest"  )
static

String to identify log entries originating from this file.

◆ TEST_F() [1/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( ProgressTimerTest  ,
test_noDelayOrInterval   
)

◆ TEST_F() [2/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( ProgressTimerTest  ,
test_zeroInterval   
)

◆ TEST_F() [3/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( ProgressTimerTest  ,
test_justDelay   
)

◆ TEST_F() [4/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( ProgressTimerTest  ,
test_justInterval   
)

◆ TEST_F() [5/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( ProgressTimerTest  ,
test_delayAndInterval   
)

◆ TEST_F() [6/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( ProgressTimerTest  ,
test_pause   
)

◆ TEST_F() [7/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( ProgressTimerTest  ,
test_resumeDoesNotRepeat   
)

◆ TEST_F() [8/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( ProgressTimerTest  ,
testTimer_offsets   
)

◆ TEST_F() [9/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( ProgressTimerTest  ,
test_delayAndIntervalCoincide   
)

◆ TEST_F() [10/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( ProgressTimerTest  ,
test_updateInterval   
)

◆ TEST_F() [11/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( ProgressTimerTest  ,
test_updateIntervalAfterStop   
)

◆ TEST_F() [12/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_createWithNullPointers   
)

Test create() with nullptrs

◆ TEST_F() [13/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_transitionFromIdleToPlaying   
)

Test transition from Idle to Playing

◆ TEST_F() [14/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_transitionFromPlayingToStopped   
)

Test transition from Playing to Stopped with Stop Directive

◆ TEST_F() [15/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_transitionFromPlayingToStoppedToIdleWithClearAll   
)

Test transition from Playing to Stopped, then IDLE with ClearQueue.CLEAR_ALL Directive

◆ TEST_F() [16/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_continuesPlayingWithClearEnqueued   
)

Test transition from Playing to Stopped with ClearQueue.CLEAR_ENQUEUED Directive Note - should not transition to idle

◆ TEST_F() [17/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_transitionFromIdleToPlayingAfterClearAll   
)

Test transition from Idle to Playing after issuing second Play directive

◆ TEST_F() [18/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
testTransitionFromIdleToResumePlaying   
)

Test transition from Idle to Playing after issuing second Play directive, resuming

◆ TEST_F() [19/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
testTransitionFromPlayingToPlayingNextEnqueuedTrack   
)

Test transition to next track, when next track has been enqueued

◆ TEST_F() [20/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
testTransitionDontPlayEnqueuedTrackIfOffsetDifferent   
)

◆ TEST_F() [21/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_transitionFromPlayingToPaused   
)

Test transition from Playing to Paused when focus changes to Dialog channel

◆ TEST_F() [22/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_localPause_withEnqueuedTracks_doesNotAutoProgress   
)

Test that AudioPlayer stays stopped and does not progress after a local stop

◆ TEST_F() [23/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_transitionFromPausedToStopped   
)

Test transition from Paused to Stopped on Stop directive

◆ TEST_F() [24/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_transitionFromPausedToIdle   
)

Test transition from Paused to Idle on ClearQueue.CLEAR_ALL directive

◆ TEST_F() [25/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_resumeAfterPaused   
)

Test transition from Paused to Playing after resume

◆ TEST_F() [26/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_callingProvideStateWhenIdle   
)

Test provideState while IDLE

◆ TEST_F() [27/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_onPlaybackError   
)

Test onPlaybackError and expect a PlaybackFailed message

◆ TEST_F() [28/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_onPlaybackError_Stopped   
)

Test onPlaybackError and expect a PlaybackFailed message

◆ TEST_F() [29/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
testPrebufferOnPlaybackError   
)

Test onPlaybackError during pre-buffering

◆ TEST_F() [30/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_onPlaybackPaused   
)

Test onPlaybackPaused and expect a PlaybackPaused message

◆ TEST_F() [31/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_onPlaybackResumed   
)

Test onPlaybackResumed and expect a PlaybackResumed message

◆ TEST_F() [32/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_onPlaybackFinished_bufferCompleteAfterStarted   
)

Test onPlaybackFinished and expect a PLAYBACK_NEARLY_FINISHED_NAME and a PLAYBACK_FINISHED_NAME message

◆ TEST_F() [33/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_onPlaybackFinished_bufferCompleteBeforeStarted   
)

Test onPlaybackFinished and expect a PLAYBACK_NEARLY_FINISHED_NAME and a PLAYBACK_FINISHED_NAME message

◆ TEST_F() [34/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
testOnPlaybackFinishedWithPlaybackAttributes   
)

Test onPlaybackFinished with playbackAttributes.

◆ TEST_F() [35/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
testOnPlaybackStoppedWithPlaybackReports   
)

Test onPlaybackStopped with playbackReports.

◆ TEST_F() [36/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_onBufferUnderrun   
)

Test onBufferUnderrun and expect a PlaybackStutterStarted message

◆ TEST_F() [37/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
testTimer_onBufferRefilled   
)

Test onBufferRefilled and expect a PlaybackStutterFinished message

◆ TEST_F() [38/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_onTags_filteredOut   
)

Test onTags and expect valid JSON. Build a vector of tags and pass to Observer (onTags). Observer will use the vector of tags and build a valid JSON object "StreamMetadataExtracted Event". This JSON object is verified in verifyTags. Verify that metadata not on allowlist is removed, and not sent

◆ TEST_F() [39/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_onTags_filteredIn   
)

Test onTags and expect valid JSON. Build a vector of tags and pass to Observer (onTags). Observer will use the vector of tags and build a valid JSON object "StreamMetadataExtracted Event". This JSON object is verified in verifyTags. Send data on allowlist

◆ TEST_F() [40/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_onTags_filteredIn_rateCheck   
)

Test onTags and expect valid JSON. Build a vector of tags and pass to Observer (onTags). Observer will use the vector of tags and build a valid JSON object "StreamMetadataExtracted Event". This JSON object is verified in verifyTags. Send data on allowlist make sure event not sent too fast

◆ TEST_F() [41/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_onTags_filteredIn_duplicateCheck   
)

Test onTags and expect valid JSON. Build a vector of tags and pass to Observer (onTags). Observer will use the vector of tags and build a valid JSON object "StreamMetadataExtracted Event". This JSON object is verified in verifyTags. Send data on allowlist make sure duplicate not sent

◆ TEST_F() [42/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_cancelDirective   
)

Test cancelDirective Expect the handleDirective call to the cancelled directive returns false

◆ TEST_F() [43/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_focusChangeToNoneInIdleState   
)

Test focus change to NONE in IDLE state Expect nothing to happen

◆ TEST_F() [44/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_focusChangeFromForegroundToBackgroundInIdleState   
)

Test focus change from FOREGROUND to BACKGROUND in IDLE state Expect a call to pause(). This call is intended to go through MediaPlayer and cause nothing to happen due to a lack of a queued AudioItem.

◆ TEST_F() [45/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_focusChangeFromNoneToBackgroundInIdleState   
)

Test focus change in from NONE to BACKGROUND while IDLE. Expect a call to pause. This isn't an expected state during normal execution.

◆ TEST_F() [46/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_focusChangesInPlayingState   
)

Test focus changes in PLAYING state Expect to pause when switching to BACKGROUND and to stop when switching to NONE

◆ TEST_F() [47/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_focusChangesInStoppedState   
)

Test focus changes in STOPPED state Expect to remain in STOPPED state when switching to FOREGROUND (because there are no queued AudioItems) and to transition to PAUSED when switching to BACKGROUND.

◆ TEST_F() [48/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_focusChangesInPausedState   
)

Test focus changes in PAUSED state Expect to resume when switching to FOREGROUND, expect nothing when switching to BACKGROUND, expect stop when switching to NONE

◆ TEST_F() [49/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_focusChangesInBufferUnderrunState   
)

Test focus changes in BUFFER_UNDERRUN state Expect nothing to happen when switching to FOREGROUND, expect to pause when switching to BACKGROUND, expect to stop when switching to NONE

◆ TEST_F() [50/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_focusChangeToBackgroundBeforeOnPlaybackStarted   
)

Test an immediate focus change to background after play() has been called Expect that pause() is called when AudioPlayer is pushed into background

◆ TEST_F() [51/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_playAfterOnPlaybackError   
)

Test onPlaybackError and expect AudioPlayer to change to STOPPED state and that it would go back to PLAYING state when a new REPLACE_ALL Play directive comes in.

◆ TEST_F() [52/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_playCallsCaptionManager   
)

Test play directive calls CaptionManager.onCaption()

◆ TEST_F() [53/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_playParsesCaptionPayload   
)

Test play directive parses caption payload.

◆ TEST_F() [54/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_playbackStartedSwitchesHandler   
)

Test onPlaybackStarted calls the PlaybackRouter

◆ TEST_F() [55/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_progressReportDelayElapsed   
)

Test to verify that ProgressReportDelayElapsed Event is sent correctly. This test is timing sensitive.

◆ TEST_F() [56/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_progressReportDelayElapsedDelayLessThanOffset   
)

Test to verify that ProgressReportDelayElapsed Event is not sent when the delay is less than the offset. This test is timing sensitive.

◆ TEST_F() [57/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
testTimer_progressReportIntervalElapsed   
)

Test to verify that ProgressReportIntervalElapsed Event is sent when the interval is less than the offset. There will be a ProgressReportIntervalElapsed Event at 100, 200 and 300 ms. This test is timing sensitive.

◆ TEST_F() [58/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_progressReportIntervalElapsedIntervalLessThanOffset   
)

Test to verify that ProgressReportIntervalElapsed Event is sent when the interval is less than the offset. There will be a ProgressReportIntervalElapsed Event at 200 and 300 ms. This test is timing sensitive.

◆ TEST_F() [59/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
testSlow_playOnlyAfterForegroundFocus   
)

Test when AudioPlayer goes to BACKGROUND focus that it changes to PAUSED state. And when another PLAY directive with REPLACE_ALL behavior comes in, that it would go to STOPPED state, and will not start playing again until the focus goes back to FOREGROUND.

◆ TEST_F() [60/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
testSlow_focusChangeRaceOnPlay   
)

Test when AudioPlayer goes to BACKGROUND focus that it changes to PAUSED state. And when another PLAY directive with REPLACE_ALL behavior comes in, if a Race condition occurs causing the focus change to NONE to execute while still in PAUSED state, that a FOREGROUND change will still play

◆ TEST_F() [61/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
testTimer_playbackStartedCallbackAfterFocusLost   
)

Test when AudioPlayer starts to play but loses focus before the onPlaybackStarted callback is received. After onPlaybackStarted is received, playback should stop.

◆ TEST_F() [62/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test1PlayerPool_PlayEnqueueFinishPlay   
)

◆ TEST_F() [63/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test2PlayerPool_PlayEnqueueFinishPlay   
)

◆ TEST_F() [64/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test3PlayerPool_PlayEnqueueFinishPlay   
)

◆ TEST_F() [65/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
testPlayRequestor   
)

Test the playRequestor Object can be parsed by the AudioPlayer and reported to its observers via the AudioPlayerObserverInterface.

◆ TEST_F() [66/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
testUpdateProgressReportInterval   
)

Test that when UpdateProgressReportInterval directive is sent then onProgressReportIntervalUpdated event is called.

◆ TEST_F() [67/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
testTimer_playbackFinishedMessageOrder_1Player   
)

◆ TEST_F() [68/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
testTimer_playbackFinishedMessageOrder_2Players   
)

◆ TEST_F() [69/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
testTimer_playbackValidateReportEvents_1Player   
)

◆ TEST_F() [70/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
testTimer_playbackValidateFailed_1Player   
)

◆ TEST_F() [71/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
testTimer_playbackValidateStutter_1Player   
)

◆ TEST_F() [72/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
testTimer_playbackPauseResume_1Player   
)

◆ TEST_F() [73/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_publishedCapabiltiesContainsFingerprint   
)

◆ TEST_F() [74/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_localStop   
)

◆ TEST_F() [75/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_localPause   
)

◆ TEST_F() [76/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_localResumeAfterPaused   
)

◆ TEST_F() [77/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_localSeekTo   
)

◆ TEST_F() [78/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_localSeekToWhileLocalStopped   
)

◆ TEST_F() [79/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
DISABLED_test_endOffset   
)

◆ TEST_F() [80/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_badEndOffset   
)

◆ TEST_F() [81/81]

alexaClientSDK::acsdkAudioPlayer::test::TEST_F ( AudioPlayerTest  ,
test_badEndOffsetEqualValue   
)

◆ TEST_P()

alexaClientSDK::acsdkAudioPlayer::test::TEST_P ( UtilTestRealCryptoFactoryFixture  ,
test_generateMD5Hash   
)

◆ TOKEN_TEST()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::TOKEN_TEST ( "Token_Test"  )
static

Token for testing.

◆ URL_TEST()

static const std::string alexaClientSDK::acsdkAudioPlayer::test::URL_TEST ( "cid:Test"  )
static

URL for testing.

◆ verifyOffset()

static void alexaClientSDK::acsdkAudioPlayer::test::verifyOffset ( std::chrono::milliseconds  expected,
std::chrono::milliseconds  received 
)
static

Helper function used to validate received offset values.

Parameters
expectedThe expected offset.
receivedThe received offset.

Variable Documentation

◆ ACTIVITY_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::ACTIVITY_KEY = "playerActivity"
static

Player activity JSON key.

◆ CAPTION_CONTENT_SAMPLE

const std::string alexaClientSDK::acsdkAudioPlayer::test::CAPTION_CONTENT_SAMPLE
static
Initial value:
=
"WEBVTT\\n"
"\\n"
"1\\n"
"00:00.000 --> 00:01.260\\n"
"The time is 2:17 PM."

◆ CLEAR_ALL_PAYLOAD_TEST

const std::string alexaClientSDK::acsdkAudioPlayer::test::CLEAR_ALL_PAYLOAD_TEST
static
Initial value:
=
"{"
"\"clearBehavior\":\"" + NAME_CLEAR_ALL + "\""
"}"
static const std::string NAME_CLEAR_ALL("CLEAR_ALL")
CLEAR_ALL clearBehavior.

CLEAR_ALL payload for testing.

◆ CLEAR_ENQUEUED_PAYLOAD_TEST

const std::string alexaClientSDK::acsdkAudioPlayer::test::CLEAR_ENQUEUED_PAYLOAD_TEST
static
Initial value:
=
"{"
"\"clearBehavior\":\"" + NAME_CLEAR_ENQUEUED + "\""
"}"
static const std::string NAME_CLEAR_ENQUEUED("CLEAR_ENQUEUED")
CLEAR_ENQUEUED clearBehavior.

CLEAR_ENQUEUED payload for testing.

◆ DEFAULT_MEDIA_PLAYER_STATE

const MediaPlayerState alexaClientSDK::acsdkAudioPlayer::test::DEFAULT_MEDIA_PLAYER_STATE = {std::chrono::milliseconds(0)}
static

Default media player state for reporting all playback offsets.

◆ EMPTY_PAYLOAD_TEST

const std::string alexaClientSDK::acsdkAudioPlayer::test::EMPTY_PAYLOAD_TEST = "{}"
static

Empty payload for testing.

◆ EVENTS_WITH_REPORTS

const std::vector<std::string> alexaClientSDK::acsdkAudioPlayer::test::EVENTS_WITH_REPORTS
static
Initial value:
static const std::string PLAYBACK_FINISHED_NAME
Name of PlaybackFinished event.
Definition: AudioPlayerTest.cpp:531
static const std::string PROGRESS_REPORT_INTERVAL_ELAPSED_NAME
Name of ProgressReportIntervalElapsed event.
Definition: AudioPlayerTest.cpp:555
static const std::string PLAYBACK_STOPPED_NAME
Name of PlaybackStopped event.
Definition: AudioPlayerTest.cpp:534
static const std::string PLAYBACK_FAILED_NAME
Name of PlaybackFailed event.
Definition: AudioPlayerTest.cpp:540

List of event messages expected to have PlaybackReports field.

◆ FAIL_TIMEOUT

const std::chrono::seconds alexaClientSDK::acsdkAudioPlayer::test::FAIL_TIMEOUT {5}
static

5 second timer to allow plenty of time for expected behaviors to be detected.

◆ FINGERPRINT

const Fingerprint alexaClientSDK::acsdkAudioPlayer::test::FINGERPRINT = {"com.audioplayer.test", "DEBUG", "0001"}
static

Fingerprint for media player.

◆ FINGERPRINT_BUILD_TYPE_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::FINGERPRINT_BUILD_TYPE_KEY = "buildType"
static

JSON key for "buildType" in fingerprint configuration.

◆ FINGERPRINT_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::FINGERPRINT_KEY = "fingerprint"
static

Key for "fingerprint" in AudioPlayer configurations.

◆ FINGERPRINT_PACKAGE_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::FINGERPRINT_PACKAGE_KEY = "package"
static

JSON key for "package" in fingerprint configuration.

◆ FINGERPRINT_VERSION_NUMBER_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::FINGERPRINT_VERSION_NUMBER_KEY = "versionNumber"
static

JSON key for "versionNumber" in fingerprint configuration.

◆ IDLE_STATE

const std::string alexaClientSDK::acsdkAudioPlayer::test::IDLE_STATE {"IDLE"}
static

The IDLE state of the AudioPlayer.

◆ IDLE_STATE_TEST

const std::string alexaClientSDK::acsdkAudioPlayer::test::IDLE_STATE_TEST
static
Initial value:
=
"{"
"\"token\":\"\","
"\"offsetInMilliseconds\":" + std::to_string(0) + ","
"\"playerActivity\":\"" + IDLE_STATE + "\""
"}"
static const std::string IDLE_STATE
The IDLE state of the AudioPlayer.
Definition: AudioPlayerTest.cpp:160

The expected state when the AudioPlayer is not handling any directive.

◆ LOWER_ERROR

const std::chrono::milliseconds alexaClientSDK::acsdkAudioPlayer::test::LOWER_ERROR {100}
static

Amount an offset can be less than expected and still be acceptable.

◆ MESSAGE_EVENT_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_EVENT_KEY = "event"
static

JSON key for the event section of a message.

◆ MESSAGE_HEADER_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_HEADER_KEY = "header"
static

JSON key for the header section of a message.

◆ MESSAGE_METADATA_BOOLEAN_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_METADATA_BOOLEAN_KEY = "BooleanKey"
static

JSON key for "boolean" type field in metadata section of StreamMetadataExtracted event.

◆ MESSAGE_METADATA_BOOLEAN_VALUE

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_METADATA_BOOLEAN_VALUE = "true"
static

JSON value for "boolean" type field in metadata section of StreamMetadataExtracted event.

◆ MESSAGE_METADATA_DOUBLE_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_METADATA_DOUBLE_KEY = "DoubleKey"
static

JSON key for "double" type field in metadata section of StreamMetadataExtracted event.

◆ MESSAGE_METADATA_DOUBLE_VALUE

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_METADATA_DOUBLE_VALUE = "3.14"
static

JSON value for "double" type field in metadata section of StreamMetadataExtracted event.

◆ MESSAGE_METADATA_INT_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_METADATA_INT_KEY = "IntKey"
static

JSON key for "int" type field in metadata section of StreamMetadataExtracted event.

◆ MESSAGE_METADATA_INT_VALUE

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_METADATA_INT_VALUE = "67890"
static

JSON value for "int" type field in metadata section of StreamMetadataExtracted event.

◆ MESSAGE_METADATA_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_METADATA_KEY = "metadata"
static

JSON key for the metadata section of a message.

◆ MESSAGE_METADATA_STRING_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_METADATA_STRING_KEY = "StringKey"
static

JSON key for "string" type field in metadata section of StreamMetadataExtracted event.

◆ MESSAGE_METADATA_STRING_KEY_WL

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_METADATA_STRING_KEY_WL = "Title"
static

JSON key for "string" type field in metadata section of StreamMetadataExtracted event. On allowlist.

◆ MESSAGE_METADATA_STRING_VALUE

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_METADATA_STRING_VALUE = "StringValue"
static

JSON value for "string" type field in metadata section of StreamMetadataExtracted event.

◆ MESSAGE_METADATA_STRING_VALUE_ALT

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_METADATA_STRING_VALUE_ALT = "StringValue2"
static

JSON value for alternate "string" type field in metadata section of StreamMetadataExtracted event.

◆ MESSAGE_METADATA_UINT_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_METADATA_UINT_KEY = "UintKey"
static

JSON key for "uint" type field in metadata section of StreamMetadataExtracted event.

◆ MESSAGE_METADATA_UINT_VALUE

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_METADATA_UINT_VALUE = "12345"
static

JSON value for "uint" type field in metadata section of StreamMetadataExtracted event.

◆ MESSAGE_NAME_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_NAME_KEY = "name"
static

JSON key for the name section of a message.

◆ MESSAGE_PAYLOAD_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_PAYLOAD_KEY = "payload"
static

JSON key for the payload section of a message.

◆ MESSAGE_PLAYBACK_ATTRIBUTES_BITRATE_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_PLAYBACK_ATTRIBUTES_BITRATE_KEY = "dataRateInBitsPerSecond"
static

JSON key for "dataRateInBitsPerSecond" field in playbackAttributes section of message.

◆ MESSAGE_PLAYBACK_ATTRIBUTES_BITRATE_VALUE

const long alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_PLAYBACK_ATTRIBUTES_BITRATE_VALUE = 49000
static

JSON value for "dataRateInBitsPerSecond" field in playbackAttributes section of message.

◆ MESSAGE_PLAYBACK_ATTRIBUTES_CODEC_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_PLAYBACK_ATTRIBUTES_CODEC_KEY = "codec"
static

JSON key for "codec" field in playbackAttributes section of message.

◆ MESSAGE_PLAYBACK_ATTRIBUTES_CODEC_VALUE

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_PLAYBACK_ATTRIBUTES_CODEC_VALUE = "opus"
static

JSON value for "codec" field in playbackAttributes section of message.

◆ MESSAGE_PLAYBACK_ATTRIBUTES_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_PLAYBACK_ATTRIBUTES_KEY = "playbackAttributes"
static

JSON key for the playbackAttributes section of a message.

◆ MESSAGE_PLAYBACK_ATTRIBUTES_NAME_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_PLAYBACK_ATTRIBUTES_NAME_KEY = "name"
static

JSON key for "name" field in playbackAttributes section of message.

◆ MESSAGE_PLAYBACK_ATTRIBUTES_NAME_VALUE

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_PLAYBACK_ATTRIBUTES_NAME_VALUE = "STREAM_NAME_ABSENT"
static

JSON value for "name" field in playbackAttributes section of message.

◆ MESSAGE_PLAYBACK_ATTRIBUTES_SAMPLING_RATE_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_PLAYBACK_ATTRIBUTES_SAMPLING_RATE_KEY = "samplingRateInHertz"
static

JSON key for "samplingRateInHertz" field in playbackAttributes section of message.

◆ MESSAGE_PLAYBACK_ATTRIBUTES_SAMPLING_RATE_VALUE

const long alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_PLAYBACK_ATTRIBUTES_SAMPLING_RATE_VALUE = 48000
static

JSON value for "samplingRateInHertz" field in playbackAttributes section of message.

◆ MESSAGE_PLAYBACK_REPORTS_END_OFFSET_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_PLAYBACK_REPORTS_END_OFFSET_KEY = "endOffsetInMilliseconds"
static

JSON key for "endOffsetInMilliseconds" field in playbackReports section of message.

◆ MESSAGE_PLAYBACK_REPORTS_END_OFFSET_VALUE

const long alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_PLAYBACK_REPORTS_END_OFFSET_VALUE = 10000
static

JSON value for "endOffsetInMilliseconds" field in playbackReports section of message.

◆ MESSAGE_PLAYBACK_REPORTS_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_PLAYBACK_REPORTS_KEY = "playbackReports"
static

JSON key for the playbackReports section of a message.

◆ MESSAGE_PLAYBACK_REPORTS_START_OFFSET_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_PLAYBACK_REPORTS_START_OFFSET_KEY = "startOffsetInMilliseconds"
static

JSON key for "startOffsetInMilliseconds" field in playbackReports section of message.

◆ MESSAGE_PLAYBACK_REPORTS_START_OFFSET_VALUE

const long alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_PLAYBACK_REPORTS_START_OFFSET_VALUE = 0
static

JSON value for "startOffsetInMilliseconds" field in playbackReports section of message.

◆ MESSAGE_TOKEN_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::MESSAGE_TOKEN_KEY = "token"
static

JSON key for the token section of a message.

◆ METADATA_EVENT_DELAY

const long alexaClientSDK::acsdkAudioPlayer::test::METADATA_EVENT_DELAY {1001}
static

The time to wait before sending 'onTags()' after the last send.

◆ MILLIS_10

const std::chrono::milliseconds alexaClientSDK::acsdkAudioPlayer::test::MILLIS_10 {10}
static

10 millisecond delay or interval value.

◆ MILLIS_100

const std::chrono::milliseconds alexaClientSDK::acsdkAudioPlayer::test::MILLIS_100 {100}
static

100 millisecond duration to allow ProgressTimer to misbehave.

◆ MILLIS_25

const std::chrono::milliseconds alexaClientSDK::acsdkAudioPlayer::test::MILLIS_25 {25}
static

25 millisecond delay or interval value (something not an interval of MILLIS_10).

◆ NAMESPACE_AND_NAME_PLAYBACK_STATE

const NamespaceAndName alexaClientSDK::acsdkAudioPlayer::test::NAMESPACE_AND_NAME_PLAYBACK_STATE {NAMESPACE_AUDIO_PLAYER, "PlaybackState"}
static

The NamespaceAndName to send to the ContextManager.

◆ OFFSET_IN_MILLISECONDS_AFTER_PROGRESS_REPORT_DELAY

const long alexaClientSDK::acsdkAudioPlayer::test::OFFSET_IN_MILLISECONDS_AFTER_PROGRESS_REPORT_DELAY {PROGRESS_REPORT_DELAY + 1}
static

The offset in milliseconds returned by the mock media player slightly before the progressReportDelayInMilliseconds.

◆ OFFSET_IN_MILLISECONDS_AFTER_PROGRESS_REPORT_INTERVAL

const long alexaClientSDK::acsdkAudioPlayer::test::OFFSET_IN_MILLISECONDS_AFTER_PROGRESS_REPORT_INTERVAL {PROGRESS_REPORT_INTERVAL + 1}
static

The offset in milliseconds returned by the mock media player slightly before the progressReportIntervalInMilliseconds.

◆ OFFSET_IN_MILLISECONDS_BEFORE_PROGRESS_REPORT_DELAY

const long alexaClientSDK::acsdkAudioPlayer::test::OFFSET_IN_MILLISECONDS_BEFORE_PROGRESS_REPORT_DELAY {PROGRESS_REPORT_DELAY - 1}
static

The offset in milliseconds returned by the mock media player slightly before the progressReportDelayInMilliseconds.

◆ OFFSET_IN_MILLISECONDS_BEFORE_PROGRESS_REPORT_INTERVAL

const long alexaClientSDK::acsdkAudioPlayer::test::OFFSET_IN_MILLISECONDS_BEFORE_PROGRESS_REPORT_INTERVAL {PROGRESS_REPORT_INTERVAL - 1}
static

The offset in milliseconds returned by the mock media player slightly before the progressReportIntervalInMilliseconds.

◆ OFFSET_IN_MILLISECONDS_TEST

const long alexaClientSDK::acsdkAudioPlayer::test::OFFSET_IN_MILLISECONDS_TEST {100}
static

The offset in milliseconds returned by the mock media player.

◆ OFFSET_IN_MILLISECONDS_TEST2

const long alexaClientSDK::acsdkAudioPlayer::test::OFFSET_IN_MILLISECONDS_TEST2 {0}
static

The offset in milliseconds returned by the mock media player.

◆ OFFSET_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::OFFSET_KEY = "offsetInMilliseconds"
static

Offset JSON key.

◆ OFFSET_TEST_DELAY

const std::chrono::milliseconds alexaClientSDK::acsdkAudioPlayer::test::OFFSET_TEST_DELAY {300}
static

Delay value to use for test to verify offsets.

◆ OFFSET_TEST_INTERVAL

const std::chrono::milliseconds alexaClientSDK::acsdkAudioPlayer::test::OFFSET_TEST_INTERVAL {500}
static

Interval value to use for test to verify offsets.

◆ PLAY_REQUESTOR_ID

const std::string alexaClientSDK::acsdkAudioPlayer::test::PLAY_REQUESTOR_ID {"12345678"}
static

A playRequestor object id.

◆ PLAY_REQUESTOR_PAYLOAD_TEST

const std::string alexaClientSDK::acsdkAudioPlayer::test::PLAY_REQUESTOR_PAYLOAD_TEST
static
Initial value:
=
"{"
"\"playBehavior\":\"" + NAME_REPLACE_ALL + "\","
"\"playRequestor\": {"
"\"type\":\"" + PLAY_REQUESTOR_TYPE_ALERT + "\","
"\"id\":\"" + PLAY_REQUESTOR_ID + "\""
"},"
"\"audioItem\": {"
"\"audioItemId\":\"" + AUDIO_ITEM_ID_2 + "\","
"\"stream\": {"
"\"url\":\"" + URL_TEST + "\","
"\"streamFormat\":\"" + FORMAT_TEST + "\","
"\"offsetInMilliseconds\":" + std::to_string(OFFSET_IN_MILLISECONDS_TEST) + ","
"\"expiryTime\":\"" + EXPIRY_TEST + "\","
"\"progressReport\": {"
"\"progressReportDelayInMilliseconds\":" + std::to_string(PROGRESS_REPORT_DELAY) + ","
"\"progressReportIntervalInMilliseconds\":" + std::to_string(PROGRESS_REPORT_INTERVAL) +
"},"
"\"token\":\"" + TOKEN_TEST + "\","
"\"expectedPreviousToken\":\"\""
"}"
"}"
"}"
static const std::string NAME_REPLACE_ALL("REPLACE_ALL")
REPLACE_ALL playBehavior.
static const long OFFSET_IN_MILLISECONDS_TEST
The offset in milliseconds returned by the mock media player.
Definition: AudioPlayerTest.cpp:163
static const std::string PLAY_REQUESTOR_TYPE_ALERT
A playRequestor object with type "ALERT".
Definition: AudioPlayerTest.cpp:206
static const std::string EXPIRY_TEST("481516234248151623421088")
ExpiryTime for testing. Needs to be in ISO 8601 format.
static const std::string FORMAT_TEST("AUDIO_MPEG")
Format of the audio.
static const long PROGRESS_REPORT_DELAY
progressReportDelayInMilliseconds for testing.
Definition: AudioPlayerTest.cpp:172
static const std::string PLAY_REQUESTOR_ID
A playRequestor object id.
Definition: AudioPlayerTest.cpp:209
static const long PROGRESS_REPORT_INTERVAL
progressReportIntervalInMilliseconds for testing.
Definition: AudioPlayerTest.cpp:175
static const std::string AUDIO_ITEM_ID_2("testID2")
static const std::string TOKEN_TEST("Token_Test")
Token for testing.
static const std::string URL_TEST("cid:Test")
URL for testing.

◆ PLAY_REQUESTOR_TYPE_ALERT

const std::string alexaClientSDK::acsdkAudioPlayer::test::PLAY_REQUESTOR_TYPE_ALERT {"ALERT"}
static

A playRequestor object with type "ALERT".

◆ PLAYBACK_FAILED_NAME

const std::string alexaClientSDK::acsdkAudioPlayer::test::PLAYBACK_FAILED_NAME = "PlaybackFailed"
static

Name of PlaybackFailed event.

◆ PLAYBACK_FINISHED_NAME

const std::string alexaClientSDK::acsdkAudioPlayer::test::PLAYBACK_FINISHED_NAME = "PlaybackFinished"
static

Name of PlaybackFinished event.

◆ PLAYBACK_NEARLY_FINISHED_NAME

const std::string alexaClientSDK::acsdkAudioPlayer::test::PLAYBACK_NEARLY_FINISHED_NAME = "PlaybackNearlyFinished"
static

Name of PlaybackNearlyFinished event.

◆ PLAYBACK_PAUSED_NAME

const std::string alexaClientSDK::acsdkAudioPlayer::test::PLAYBACK_PAUSED_NAME = "PlaybackPaused"
static

Name of PlaybackPaused event.

◆ PLAYBACK_RESUMED_NAME

const std::string alexaClientSDK::acsdkAudioPlayer::test::PLAYBACK_RESUMED_NAME = "PlaybackResumed"
static

Name of PlaybackResumed event.

◆ PLAYBACK_STARTED_NAME

const std::string alexaClientSDK::acsdkAudioPlayer::test::PLAYBACK_STARTED_NAME = "PlaybackStarted"
static

Name of PlaybackStarted event.

◆ PLAYBACK_STOPPED_NAME

const std::string alexaClientSDK::acsdkAudioPlayer::test::PLAYBACK_STOPPED_NAME = "PlaybackStopped"
static

Name of PlaybackStopped event.

◆ PLAYBACK_STUTTER_FINISHED_NAME

const std::string alexaClientSDK::acsdkAudioPlayer::test::PLAYBACK_STUTTER_FINISHED_NAME = "PlaybackStutterFinished"
static

Name of PlaybackStutterFinished event.

◆ PLAYBACK_STUTTER_STARTED_NAME

const std::string alexaClientSDK::acsdkAudioPlayer::test::PLAYBACK_STUTTER_STARTED_NAME = "PlaybackStutterStarted"
static

Name of PlaybackStutterStarted event.

◆ PLAYING_STATE

const std::string alexaClientSDK::acsdkAudioPlayer::test::PLAYING_STATE {"PLAYING"}
static

The PLAYING state of the AudioPlayer.

◆ PROGRESS_REPORT_DELAY

const long alexaClientSDK::acsdkAudioPlayer::test::PROGRESS_REPORT_DELAY {200}
static

progressReportDelayInMilliseconds for testing.

◆ PROGRESS_REPORT_DELAY_ELAPSED_NAME

const std::string alexaClientSDK::acsdkAudioPlayer::test::PROGRESS_REPORT_DELAY_ELAPSED_NAME = "ProgressReportDelayElapsed"
static

Name of ProgressReportDelayElapsed event.

◆ PROGRESS_REPORT_INTERVAL

const long alexaClientSDK::acsdkAudioPlayer::test::PROGRESS_REPORT_INTERVAL {100}
static

progressReportIntervalInMilliseconds for testing.

◆ PROGRESS_REPORT_INTERVAL_ELAPSED_NAME

const std::string alexaClientSDK::acsdkAudioPlayer::test::PROGRESS_REPORT_INTERVAL_ELAPSED_NAME = "ProgressReportIntervalElapsed"
static

Name of ProgressReportIntervalElapsed event.

◆ PROGRESS_REPORT_INTERVAL_UPDATED_NAME

const std::string alexaClientSDK::acsdkAudioPlayer::test::PROGRESS_REPORT_INTERVAL_UPDATED_NAME = "ProgressReportIntervalUpdated"
static

Name of ProgressReportIntervalUpdated event.

◆ PROVIDE_STATE_TOKEN_TEST

const unsigned int alexaClientSDK::acsdkAudioPlayer::test::PROVIDE_STATE_TOKEN_TEST {1}
static

Provide State Token for testing.

◆ REPLACE_ALL_PAYLOAD_TEST

const std::string alexaClientSDK::acsdkAudioPlayer::test::REPLACE_ALL_PAYLOAD_TEST
static
Initial value:
=
"{"
"\"playBehavior\":\"" + NAME_REPLACE_ALL + "\","
"\"audioItem\": {"
"\"audioItemId\":\"" + AUDIO_ITEM_ID_2 + "\","
"\"stream\": {"
"\"url\":\"" + URL_TEST + "\","
"\"streamFormat\":\"" + FORMAT_TEST + "\","
"\"offsetInMilliseconds\":" + std::to_string(OFFSET_IN_MILLISECONDS_TEST) + ","
"\"expiryTime\":\"" + EXPIRY_TEST + "\","
"\"progressReport\": {"
"\"progressReportDelayInMilliseconds\":" + std::to_string(PROGRESS_REPORT_DELAY) + ","
"\"progressReportIntervalInMilliseconds\":" + std::to_string(PROGRESS_REPORT_INTERVAL) +
"},"
"\"caption\": {"
"\"content\":\"" + CAPTION_CONTENT_SAMPLE + "\","
"\"type\":\"WEBVTT\""
"},"
"\"token\":\"" + TOKEN_TEST + "\","
"\"expectedPreviousToken\":\"\""
"}"
"}"
"}"
static const std::string NAME_REPLACE_ALL("REPLACE_ALL")
REPLACE_ALL playBehavior.
static const long OFFSET_IN_MILLISECONDS_TEST
The offset in milliseconds returned by the mock media player.
Definition: AudioPlayerTest.cpp:163
static const std::string EXPIRY_TEST("481516234248151623421088")
ExpiryTime for testing. Needs to be in ISO 8601 format.
static const std::string FORMAT_TEST("AUDIO_MPEG")
Format of the audio.
static const long PROGRESS_REPORT_DELAY
progressReportDelayInMilliseconds for testing.
Definition: AudioPlayerTest.cpp:172
static const long PROGRESS_REPORT_INTERVAL
progressReportIntervalInMilliseconds for testing.
Definition: AudioPlayerTest.cpp:175
static const std::string AUDIO_ITEM_ID_2("testID2")
static const std::string TOKEN_TEST("Token_Test")
Token for testing.
static const std::string CAPTION_CONTENT_SAMPLE
Definition: AudioPlayerTest.cpp:198
static const std::string URL_TEST("cid:Test")
URL for testing.

◆ SEEK_COMPLETE_NAME

const std::string alexaClientSDK::acsdkAudioPlayer::test::SEEK_COMPLETE_NAME = "PlaybackSeeked"
static

Name of SeekComplete event.

◆ SEEK_END_OFFSET_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::SEEK_END_OFFSET_KEY = "seekEndOffsetInMilliseconds"
static

Offset JSON key.

◆ STREAM_METADATA_EXTRACTED_NAME

const std::string alexaClientSDK::acsdkAudioPlayer::test::STREAM_METADATA_EXTRACTED_NAME = "StreamMetadataExtracted"
static

Name of StreamMetadataExtracted event.

◆ TIME_FOR_TWO_AND_A_HALF_INTERVAL_PERIODS

const std::chrono::milliseconds alexaClientSDK::acsdkAudioPlayer::test::TIME_FOR_TWO_AND_A_HALF_INTERVAL_PERIODS
static
Initial value:
{
std::chrono::milliseconds((2 * PROGRESS_REPORT_INTERVAL) + (PROGRESS_REPORT_INTERVAL / 2))}
static const long PROGRESS_REPORT_INTERVAL
progressReportIntervalInMilliseconds for testing.
Definition: AudioPlayerTest.cpp:175

The time that must elapse in order to get 2.5 interval periods.

◆ TOKEN_KEY

const std::string alexaClientSDK::acsdkAudioPlayer::test::TOKEN_KEY = "token"
static

Token JSON key.

◆ UPDATE_PROGRESS_REPORT_INTERVAL_PAYLOAD_TEST

const std::string alexaClientSDK::acsdkAudioPlayer::test::UPDATE_PROGRESS_REPORT_INTERVAL_PAYLOAD_TEST
static
Initial value:
=
"{"
"\"progressReportIntervalInMilliseconds\": 500"
"}"

UPDATE_PROGRESS_REPORT_INTERVAL payload for testing.

◆ UPPER_ERROR

const std::chrono::milliseconds alexaClientSDK::acsdkAudioPlayer::test::UPPER_ERROR {200}
static

Amount an offset can be greater than expected and still be acceptable.

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