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

Classes

class  CaptionManagerTest
 
class  CaptionTimingAdapterTest
 
class  MockCaptionManager
 
class  MockCaptionParser
 
class  MockCaptionPresenter
 
class  MockCaptionTimingAdapter
 
class  MockSystemClockDelay
 
class  TestTimingAdapterFactory
 

Functions

 TEST_F (CaptionManagerTest, test_testTestTimingAdapterFactory)
 
 TEST_F (CaptionManagerTest, test_testSetMediaPlayerBindsMediaPlayer)
 
 TEST_F (CaptionManagerTest, test_createWithNullArgs)
 
 TEST_F (CaptionManagerTest, test_createWithNullTimingAdapterFactory)
 
 TEST_F (CaptionManagerTest, test_createWithNullParser)
 
 TEST_F (CaptionManagerTest, test_sourceIdDoesNotChange)
 
 TEST_F (CaptionManagerTest, test_singleMediaPlayerPause)
 
 TEST_F (CaptionManagerTest, test_splitCaptionFrameWhitespaceOnly)
 
 TEST_F (CaptionManagerTest, test_splitCaptionFrameWhitespaceAfterLineWrap)
 
 TEST_F (CaptionManagerTest, test_splitCaptionFrameNoWhitespaceBeforeWrapIndex)
 
 TEST_F (CaptionManagerTest, test_splitCaptionFrameFalseWillNotSplitLine)
 
 TEST_F (CaptionManagerTest, test_splitCaptionFrameAtSpaceIndex)
 
 TEST_F (CaptionManagerTest, test_testAddDuplicateMediaPlayerFails)
 
 TEST_F (CaptionManagerTest, test_testAddMediaPlayerBindsMediaPlayer)
 
 TEST_F (CaptionManagerTest, test_testRemoveMediaPlayerUnbindsMediaPlayer)
 
 TEST_F (CaptionManagerTest, test_isEnabled)
 
 TEST_F (CaptionTimingAdapterTest, test_queueForDisplayNotifiesPresenter)
 
 TEST_F (CaptionTimingAdapterTest, test_queueForDisplayWithDelay)
 
 TEST (CaptionDataTest, test_captionFormatUnknownIsInvalidWithNonBlankText)
 
 TEST (CaptionDataTest, test_captionFormatUnknownIsInvalidWithBlankText)
 
 TEST (CaptionDataTest, test_captionFormatWebvttIsValidWithNonBlankText)
 
 TEST (CaptionDataTest, test_captionFormatWebvttIsValidWithBlankText)
 
 TEST (CaptionFormatUtilsTest, test_WebvttCaptionTypePutToString)
 
 TEST (CaptionFormatUtilsTest, test_UnkownCaptionTypePutToString)
 
 TEST (CaptionFrameTest, test_putToOperatorOnEmptyCaptionFrame)
 
 TEST (CaptionLineTest, test_noStylesSplitIndexZero)
 
 TEST (CaptionLineTest, test_noStylesSplitIndexOutOfBounds)
 
 TEST (CaptionLineTest, test_putToOnEmptyCaptionLine)
 
 TEST (CaptionLineTest, test_singleStyleSplit)
 
 TEST (CaptionLineTest, test_singleStyleSplitBeforeWhitespace)
 
 TEST (CaptionLineTest, test_indexAdjustmentWithWhitespaceContent)
 
 TEST (CaptionLineTest, test_indexAdjustmentWithSeveralWhitespacesBeforeContent)
 
 TEST (CaptionLineTest, test_singleStyleSplitAfter)
 
 TEST (CaptionLineTest, test_singleStyleSplitMiddle)
 
 TEST (CaptionLineTest, test_multipleStyleSplitBefore)
 
 TEST (CaptionLineTest, test_emptySplit)
 
 TEST (CaptionLineTest, test_singleStyleMerge)
 
 TEST (CaptionLineTest, test_missingStylesMerge)
 
 TEST (CaptionLineTest, test_firstLineMissingStylesMerge)
 
 TEST (CaptionLineTest, test_multipleStyleMerge)
 
 TEST (TextStyleTest, test_putToOperatorOnEmptyTextStyle)
 

Function Documentation

◆ TEST() [1/23]

alexaClientSDK::captions::test::TEST ( CaptionDataTest  ,
test_captionFormatUnknownIsInvalidWithNonBlankText   
)

Test that CaptionData is invalid when it contains text and has a format of UNKNOWN.

◆ TEST() [2/23]

alexaClientSDK::captions::test::TEST ( CaptionFormatUtilsTest  ,
test_WebvttCaptionTypePutToString   
)

Tests the insertion operator for CaptionFormat::WEBVTT.

◆ TEST() [3/23]

alexaClientSDK::captions::test::TEST ( TextStyleTest  ,
test_putToOperatorOnEmptyTextStyle   
)

Tests the insertion operator for an empty TextStyle object.

◆ TEST() [4/23]

alexaClientSDK::captions::test::TEST ( CaptionFrameTest  ,
test_putToOperatorOnEmptyCaptionFrame   
)

Tests the insertion operator for an empty CaptionFrame object.

◆ TEST() [5/23]

alexaClientSDK::captions::test::TEST ( CaptionLineTest  ,
test_noStylesSplitIndexZero   
)

Tests that a zero splitting index returns sanely.

◆ TEST() [6/23]

alexaClientSDK::captions::test::TEST ( CaptionDataTest  ,
test_captionFormatUnknownIsInvalidWithBlankText   
)

Test that CaptionData is invalid when it contains no text and has a format of UNKNOWN.

◆ TEST() [7/23]

alexaClientSDK::captions::test::TEST ( CaptionFormatUtilsTest  ,
test_UnkownCaptionTypePutToString   
)

Tests the insertion operator for CaptionFormat::UNKNOWN.

◆ TEST() [8/23]

alexaClientSDK::captions::test::TEST ( CaptionLineTest  ,
test_noStylesSplitIndexOutOfBounds   
)

Tests that an out of bounds splitting index returns sanely.

◆ TEST() [9/23]

alexaClientSDK::captions::test::TEST ( CaptionDataTest  ,
test_captionFormatWebvttIsValidWithNonBlankText   
)

Test that CaptionData is valid when it contains text and has a format of WEBVTT.

◆ TEST() [10/23]

alexaClientSDK::captions::test::TEST ( CaptionDataTest  ,
test_captionFormatWebvttIsValidWithBlankText   
)

Test that CaptionData is invalid when it contains no text and has a format of WEBVTT.

◆ TEST() [11/23]

alexaClientSDK::captions::test::TEST ( CaptionLineTest  ,
test_putToOnEmptyCaptionLine   
)

Tests the insertion operator on an empty CaptionLine.

◆ TEST() [12/23]

alexaClientSDK::captions::test::TEST ( CaptionLineTest  ,
test_singleStyleSplit   
)

Tests splitting on the last character index will not break.

◆ TEST() [13/23]

alexaClientSDK::captions::test::TEST ( CaptionLineTest  ,
test_singleStyleSplitBeforeWhitespace   
)

Tests that splitting before a single style adjusts indices with whitespace present.

◆ TEST() [14/23]

alexaClientSDK::captions::test::TEST ( CaptionLineTest  ,
test_indexAdjustmentWithWhitespaceContent   
)

Test for sane index handling when the text contains only whitespace.

◆ TEST() [15/23]

alexaClientSDK::captions::test::TEST ( CaptionLineTest  ,
test_indexAdjustmentWithSeveralWhitespacesBeforeContent   
)

Test for sane index handling when the caption line contains many spaces before text.

◆ TEST() [16/23]

alexaClientSDK::captions::test::TEST ( CaptionLineTest  ,
test_singleStyleSplitAfter   
)

Tests that splitting after a single style maintains indices.

◆ TEST() [17/23]

alexaClientSDK::captions::test::TEST ( CaptionLineTest  ,
test_singleStyleSplitMiddle   
)

Tests that splitting in the middle of a single style adjusts indices.

◆ TEST() [18/23]

alexaClientSDK::captions::test::TEST ( CaptionLineTest  ,
test_multipleStyleSplitBefore   
)

Tests that splitting before multiple styles adjusts indices.

◆ TEST() [19/23]

alexaClientSDK::captions::test::TEST ( CaptionLineTest  ,
test_emptySplit   
)

Tests that the merge of an empty array returns a valid CaptionLine.

◆ TEST() [20/23]

alexaClientSDK::captions::test::TEST ( CaptionLineTest  ,
test_singleStyleMerge   
)

Tests that the output of the merge of a single style will be equal to the input.

◆ TEST() [21/23]

alexaClientSDK::captions::test::TEST ( CaptionLineTest  ,
test_missingStylesMerge   
)

Tests that the output of the merge of a CaptionLine with no style will be equal to the input.

◆ TEST() [22/23]

alexaClientSDK::captions::test::TEST ( CaptionLineTest  ,
test_firstLineMissingStylesMerge   
)

Tests that the output of the merge of a single style will be equal to the input.

◆ TEST() [23/23]

alexaClientSDK::captions::test::TEST ( CaptionLineTest  ,
test_multipleStyleMerge   
)

Tests that the output of the merge of multiple styles will be equal to the joined together input.

◆ TEST_F() [1/18]

alexaClientSDK::captions::test::TEST_F ( CaptionTimingAdapterTest  ,
test_queueForDisplayNotifiesPresenter   
)

Tests that the queueForDisplay function will eventually notify the presenter.

◆ TEST_F() [2/18]

alexaClientSDK::captions::test::TEST_F ( CaptionManagerTest  ,
test_testTestTimingAdapterFactory   
)

Sanity test to ensure the TestTimingAdapterFactory is returning the expected result.

◆ TEST_F() [3/18]

alexaClientSDK::captions::test::TEST_F ( CaptionTimingAdapterTest  ,
test_queueForDisplayWithDelay   
)

Tests that delays will notify the presenter after honoring the delay period.

◆ TEST_F() [4/18]

alexaClientSDK::captions::test::TEST_F ( CaptionManagerTest  ,
test_testSetMediaPlayerBindsMediaPlayer   
)

Test that CaptionManager::setMediaPlayers() adds a media player that is bound to media events.

◆ TEST_F() [5/18]

alexaClientSDK::captions::test::TEST_F ( CaptionManagerTest  ,
test_createWithNullArgs   
)

Test that create fails with null arguments

◆ TEST_F() [6/18]

alexaClientSDK::captions::test::TEST_F ( CaptionManagerTest  ,
test_createWithNullTimingAdapterFactory   
)

Test that create succeeds with a null TimingAdapterFactory.

◆ TEST_F() [7/18]

alexaClientSDK::captions::test::TEST_F ( CaptionManagerTest  ,
test_createWithNullParser   
)

Test that create fails with a null Parser.

◆ TEST_F() [8/18]

alexaClientSDK::captions::test::TEST_F ( CaptionManagerTest  ,
test_sourceIdDoesNotChange   
)

Test that the source ID is maintained from onParsed() to queueForDisplay().

◆ TEST_F() [9/18]

alexaClientSDK::captions::test::TEST_F ( CaptionManagerTest  ,
test_singleMediaPlayerPause   
)

Test the media focus behavior for a single media player instance.

◆ TEST_F() [10/18]

alexaClientSDK::captions::test::TEST_F ( CaptionManagerTest  ,
test_splitCaptionFrameWhitespaceOnly   
)

Tests the splitting behavior when the caption is all spaces.

◆ TEST_F() [11/18]

alexaClientSDK::captions::test::TEST_F ( CaptionManagerTest  ,
test_splitCaptionFrameWhitespaceAfterLineWrap   
)

Tests the splitting behavior when the caption is all spaces after a line wrap.

◆ TEST_F() [12/18]

alexaClientSDK::captions::test::TEST_F ( CaptionManagerTest  ,
test_splitCaptionFrameNoWhitespaceBeforeWrapIndex   
)

Tests the splitting behavior when the a no whitespace is present at before the requested wrap index.

◆ TEST_F() [13/18]

alexaClientSDK::captions::test::TEST_F ( CaptionManagerTest  ,
test_splitCaptionFrameFalseWillNotSplitLine   
)

Tests the splitting behavior when no split is needed.

◆ TEST_F() [14/18]

alexaClientSDK::captions::test::TEST_F ( CaptionManagerTest  ,
test_splitCaptionFrameAtSpaceIndex   
)

Tests the splitting of a caption frame at a character index that happens to fall on a space character ('0x20').

◆ TEST_F() [15/18]

alexaClientSDK::captions::test::TEST_F ( CaptionManagerTest  ,
test_testAddDuplicateMediaPlayerFails   
)

Test that CaptionManager::addMediaPlayer() does not add the same media player twice.

◆ TEST_F() [16/18]

alexaClientSDK::captions::test::TEST_F ( CaptionManagerTest  ,
test_testAddMediaPlayerBindsMediaPlayer   
)

Test that CaptionManager::addMediaPlayer() adds a media player that is bound to media events.

◆ TEST_F() [17/18]

alexaClientSDK::captions::test::TEST_F ( CaptionManagerTest  ,
test_testRemoveMediaPlayerUnbindsMediaPlayer   
)

Test that CaptionManager::removeMediaPlayer() removes a media player bound to media events.

◆ TEST_F() [18/18]

alexaClientSDK::captions::test::TEST_F ( CaptionManagerTest  ,
test_isEnabled   
)

Tests that the caption manager is enabled after construction when captions are enabled.

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