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

Classes

class  BluetoothMediaInputTransformerTest
 
class  BluetoothTest
 
class  MockPlaybackRouter
 
class  SQLiteBluetoothStorageParameterizedTests
 Parameterized tests to test both migrated and newly created databases. More...
 
class  SQLiteBluetoothStorageTest
 

Functions

 TEST_F (BluetoothMediaInputTransformerTest, test_createWithNullParams)
 Test that create() returns a nullptr if called with invalid arguments. More...
 
 TEST_F (BluetoothMediaInputTransformerTest, test_handlePlayCommand)
 Test that a Play AVRCP command is transformed to playButtonPressed(). More...
 
 TEST_F (BluetoothMediaInputTransformerTest, test_handlePauseCommand)
 Test that a Pause AVRCP command is transformed to pauseButtonPressed(). More...
 
 TEST_F (BluetoothMediaInputTransformerTest, test_handleNextCommand)
 Test that a Next AVRCP command is transformed to nextButtonPressed(). More...
 
 TEST_F (BluetoothMediaInputTransformerTest, test_handlePreviousCommand)
 Test that a Previous AVRCP command is transformed to previousButtonPressed(). More...
 
 TEST_F (BluetoothMediaInputTransformerTest, handlePlayPauseCommand)
 Test that a Play/Pause Media command is transformed to playButtonPressed(). More...
 
 TEST_F (BluetoothMediaInputTransformerTest, test_unrelatedEvent)
 Test that an unrelated event does not trigger any calls to the PlaybackRouter. More...
 
static std::chrono::milliseconds WAIT_TIMEOUT_MS (1000)
 Wait timeout. More...
 
static std::chrono::milliseconds EVENT_PROCESS_DELAY_MS (500)
 
static bool fileExists (const std::string &file)
 
 TEST_F (BluetoothTest, test_createBTWithNullParams)
 Test that create() returns a nullptr if called with invalid arguments. More...
 
 TEST_F (BluetoothTest, test_createBTWithDuplicateDeviceCategoriesInConnectionRules)
 
 TEST_F (BluetoothTest, test_createBTWithLackOfProfilesInConnectionRules)
 
 TEST_F (BluetoothTest, test_handleConnectByDeviceIdsDirectiveWithTwoA2DPDevices)
 
 TEST_F (BluetoothTest, test_handleConnectByDeviceIdsDirectiveWithOnePhoneOneGadget)
 
 TEST_F (BluetoothTest, test_handleConnectByProfileWithUnmatchedProfileName)
 
 TEST_F (BluetoothTest, test_handleConnectByProfileWithMatchedProfileName)
 
 TEST_F (BluetoothTest, test_handleConnectLocal)
 
 TEST_F (BluetoothTest, DISABLED_test_handlePairDevices)
 
 TEST_F (BluetoothTest, test_handlePairLocal)
 
 TEST_F (BluetoothTest, test_handleUnpairDevices)
 
 TEST_F (BluetoothTest, test_handleUnpairLocal)
 
 TEST_F (BluetoothTest, test_handleDisconnectDevices)
 
 TEST_F (BluetoothTest, test_handleDisconnectLocal)
 
 TEST_F (BluetoothTest, test_handleSetDeviceCategories)
 
 TEST_F (BluetoothTest, test_contentDucksUponReceivingBackgroundFocus)
 
 TEST_F (BluetoothTest, test_contentUnducksUponReceivingForegroundOrNoneFocus)
 
 TEST_F (BluetoothTest, test_streamingStateChange)
 
 TEST_F (BluetoothTest, test_focusStateChange)
 
static bool fileExists (const std::string &file)
 
 TEST_F (SQLiteBluetoothStorageTest, uninitializedDatabase)
 Test database not created yet, open should fail. More...
 
 TEST_F (SQLiteBluetoothStorageTest, openDatabase)
 Test if 2.0 database already created, open should succeed. More...
 
 TEST_F (SQLiteBluetoothStorageTest, openLegacyDatabase)
 Test if 1.0 database already created, open should succeed. More...
 
 TEST_F (SQLiteBluetoothStorageTest, retrieveCategoryforUnknownUUID)
 Test retrieving category for a UUID that does not exist after database migration. More...
 
 TEST_F (SQLiteBluetoothStorageTest, insertByMacPostDatabaseUpgrade)
 Test insertByMac after database migration. More...
 
 TEST_F (SQLiteBluetoothStorageTest, retrieveMacforKnownUUID)
 Test retrieving mac for a UUID saved before migration after database migration. More...
 
 TEST_F (SQLiteBluetoothStorageTest, retrieveCategoryforKnownUUID)
 Test retrieving category for a UUID saved before migration after database migration. More...
 
 TEST_F (SQLiteBluetoothStorageTest, retrieveCategoryforKnownMultipleUUID)
 Test retrieving category for multiple UUIDs saved before migration after database migration. More...
 
 TEST_F (SQLiteBluetoothStorageTest, testEmptyDatabase)
 Test when a database is empty. More...
 
 INSTANTIATE_TEST_CASE_P (Parameterized, SQLiteBluetoothStorageParameterizedTests, ::testing::Values(true, false))
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_createInvalidConfigurationRoot)
 Tests the create function with an invalid root. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_createValidConfigurationRoot)
 Tests creating a database object. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_createDatabaseSucceeds)
 Test creating a valid DB. This is implicitly tested in the SetUp() function, but we formally test it here. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_createExistingDatabaseFails)
 Test that creating an existing DB fails. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_openExistingDatabaseSucceeds)
 Test opening an existing database. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_clearOnOneRowSucceeds)
 Test clearing the table with one row. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_clearOnMultipleRowsSucceeds)
 Test clearing the table with multiple rows. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_clearOnEmptySucceeds)
 Test clearing the table when it's already empty. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_getUuidWithOneSucceeds)
 Test getUuid with one row containing UUID. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_getUuidWithMultipleSucceeds)
 Test getUuid with multiple rows, one of which contains the UUID. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_getUuidNoMatchingFails)
 Test getUuid with no matching UUID. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_getMacWithOneSucceeds)
 Test getMac with one row containing MAC. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_getMacWithMultipleSucceeds)
 Test getMac with multiple rows, one of which contains the MAC. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_getMacNoMatchingFails)
 Test getMac with no matching MAC. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, getCategoryWithOneSucceeds)
 Test getCategory with one row containing Unknown Category. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, getCategoryWithMultipleSucceeds)
 Test getCategory with multiple rows, two of which contains UNKNOWN, one is updated to PHONE. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, getCategoryWithMultipleInsertByMacSucceeds)
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, getCategoryNoMatchingFails)
 Test getCategory with no matching category for given uuid. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_getMacToUuidWithOneRowSucceeds)
 Test getMacToUuid with one row. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_getMacToUuidWithMultipleRowsSucceeds)
 Test getMacToUuid with multiple expected. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_getMacToUuidWithEmptySucceeds)
 Test getMacToUuid when empty. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_getUuidToMacWithOneRowSucceeds)
 Test getUuidToMac with one row. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_getUuidToMacWithMultipleRowsSucceeds)
 Test getUuidToMac with multiple expected. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_getUuidToMacWithEmptySucceeds)
 Test getUuidToMac when empty. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, getUuidToCategoryWithOneRowSucceeds)
 Test getUuidToCategory with one row. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, getUuidToCategoryWithOneRowUpdateCategorySucceeds)
 Test getUuidToCategory with one row, updated category to PHONE. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, getUuidToCategoryWithMultipleRowsSucceeds)
 Test getUuidToCategory with multiple expected. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, getUuidToCategoryWithEmptySucceeds)
 Test getUuidToCategory when empty. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, getMacToCategoryWithOneRowSucceeds)
 Test getMacToCategory with one row. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, getMacToCategoryWithOneRowUpdateCategorySucceeds)
 Test getMacToCategory with one row, updated category to PHONE. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, getMacToCategoryWithMultipleRowsSucceeds)
 Test getMacToCategory with multiple expected. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, getMacToCategoryWithEmptySucceeds)
 Test getMacToCategory when empty. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_getOrderedMacAscending)
 Test getOrderedMac and retrieve the macs in ascending insertion order (oldest first). More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_getOrderedMacDescending)
 Test getOrderedMac and retrieve the macs in descending insertion order (newest first). More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, updateByCategorySucceeds)
 Test updateByCategory succeeds. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, updateByCategoryNoMatchingFails)
 Test updateByCategory with no matching uuid. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_insertByMacSucceeds)
 Test insertByMac succeeds. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_insertByMacDuplicateFails)
 Test insertByMac existing fails. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_insertByMacOverwriteSucceeds)
 Test insertByMac with overwrite succeeds. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_removeExistingSucceeds)
 Test remove succeeds. More...
 
 TEST_P (SQLiteBluetoothStorageParameterizedTests, test_removeNonExistingSucceeds)
 Test remove on non-existing record succeeds. More...
 

Variables

static const std::string TAG {"BluetoothTest"}
 String to identify log entries originating from this file. More...
 
static const std::string TEST_BLUETOOTH_DEVICE_MAC = "01:23:45:67:89:ab"
 Test Bluetooth device mac address 1. More...
 
static const std::string TEST_BLUETOOTH_FRIENDLY_NAME = "test_friendly_name_1"
 Test Bluetooth device friendly name 1. More...
 
static const std::string TEST_BLUETOOTH_UUID = "650f973b-c2ab-4c6e-bff4-3788cd521340"
 Test Bluetooth device uuid 1. More...
 
static const std::string TEST_BLUETOOTH_DEVICE_MAC_2 = "11:23:45:67:89:ab"
 Test Bluetooth device mac address 2. More...
 
static const std::string TEST_BLUETOOTH_FRIENDLY_NAME_2 = "test_friendly_name_2"
 Test Bluetooth device friendly name 2. More...
 
static const std::string TEST_BLUETOOTH_UUID_2 = "650f973b-c2ab-4c6e-bff4-3788cd521341"
 Test Bluetooth device uuid 2. More...
 
static const std::string TEST_BLUETOOTH_DEVICE_MAC_3 = "21:23:45:67:89:ab"
 Test Bluetooth device mac address 3. More...
 
static const std::string TEST_BLUETOOTH_FRIENDLY_NAME_3 = "test_friendly_name_3"
 Test Bluetooth device friendly name 3. More...
 
static const std::string TEST_BLUETOOTH_UUID_3 = "650f973b-c2ab-4c6e-bff4-3788cd521342"
 Test Bluetooth device uuid 3. More...
 
static const std::string TEST_DATABASE = "BluetoothCATest.db"
 Test Database file name. Can be changed if there are conflicts. More...
 
static const std::string BLUETOOTH_JSON
 
static const std::string FILE_EXISTS_ERROR = "Database File " + TEST_DATABASE + " already exists."
 Error message for when the file already exists. More...
 
static const std::string NAMESPACE_BLUETOOTH = "Bluetooth"
 Namespace of Bluetooth. More...
 
static const NamespaceAndName BLUETOOTH_STATE {NAMESPACE_BLUETOOTH, "BluetoothState"}
 THe Bluetooth state portion of the Context. 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 PAYLOAD_KEY = "payload"
 JSON key for the payload section of a message. More...
 
static const std::string REQUESTER_KEY = "requester"
 JSON key for the requester section of a message. More...
 
static const std::string CLOUD_REQUESTER_VALUE = "CLOUD"
 JSON value for the cloud requester. More...
 
static const std::string DEVICE_REQUESTER_VALUE = "DEVICE"
 JSON value for the device requester. More...
 
static const std::string CONNECT_BY_DEVICE_IDS_DIRECTIVE = "ConnectByDeviceIds"
 ConnectByDevice directive. More...
 
static const std::string CONNECT_BY_PROFILE_DIRECTIVE = "ConnectByProfile"
 ConnectByProfile directive. More...
 
static const std::string PAIR_DEVICES_DIRECTIVE = "PairDevices"
 PairDevice directive. More...
 
static const std::string UNPAIR_DEVICES_DIRECTIVE = "UnpairDevices"
 UnpairDevice directive. More...
 
static const std::string DISCONNECT_DEVICES_DIRECTIVE = "DisconnectDevices"
 DisconnectDevice directive. More...
 
static const std::string SET_DEVICE_CATEGORIES = "SetDeviceCategories"
 SetDeviceCategories directive. More...
 
static const std::string TEST_MESSAGE_ID = "MessageId_Test"
 Test message id. More...
 
static const std::string TEST_MESSAGE_ID_2 = "MessageId_Test_2"
 Test message id. More...
 
static const std::string TEST_CONNECT_BY_DEVICE_IDS_PAYLOAD
 ConnectByDeviceIds payload. More...
 
static const std::string CONNECT_BY_DEVICE_IDS_SUCCEEDED = "ConnectByDeviceIdsSucceeded"
 The ConnectByDeviceIdSucceeded event name. More...
 
static const std::string CONNECT_BY_PROFILE_SUCCEEDED = "ConnectByProfileSucceeded"
 The ConnectByProfileSucceeded event name. More...
 
static const std::string CONNECT_BY_PROFILE_FAILED = "ConnectByProfileFailed"
 The ConnectByProfileFailed event name. More...
 
static const std::string PAIR_DEVICES_SUCCEEDED = "PairDevicesSucceeded"
 The PairDeviceSucceeded event name. More...
 
static const std::string UNPAIR_DEVICES_SUCCEEDED = "UnpairDevicesSucceeded"
 The UnpairDeviceSucceeded event name. More...
 
static const std::string SET_DEVICE_CATEGORIES_SUCCEEDED = "SetDeviceCategoriesSucceeded"
 The SetDeviceCategoriesSucceeded event name. More...
 
static const std::string DISCONNECT_DEVICES_SUCCEEDED = "DisconnectDevicesSucceeded"
 The DisconnectDeviceSucceeded event name. More...
 
static const std::string SCAN_DEVICES_REPORT = "ScanDevicesReport"
 The ScanDevicesUpdated event name. More...
 
static const std::string STREAMING_STARTED = "StreamingStarted"
 The StreamingStarted event name. More...
 
static const std::string STREAMING_ENDED = "StreamingEnded"
 The StreamingEnded event name. More...
 
static const std::string TEST_UNMATCHED_PROFILE_NAME = "HFP"
 Test unmatched profile name. More...
 
static const std::string TEST_MATCHED_PROFILE_NAME = "AVRCP"
 Test matched profile name. More...
 
static const std::string TEST_PROFILE_VERSION = "1"
 Test profile version. More...
 
static const std::string TEST_CONNECT_BY_PROFILE_PAYLOAD_1
 ConnectByDeviceProfile payload 1. More...
 
static const std::string TEST_CONNECT_BY_PROFILE_PAYLOAD_2
 ConnectByDeviceProfile payload 2. More...
 
static const std::string TEST_PAIR_DEVICES_PAYLOAD
 PairDevices payload. More...
 
static const std::string TEST_UNPAIR_DEVICES_PAYLOAD
 UnpairDevices payload. More...
 
static const std::string TEST_DISCONNECT_DEVICES_PAYLOAD
 DisconnectDevices payload. More...
 
static const std::string TEST_SET_DEVICE_CATEGORIES_PAYLOAD
 SetDeviceCategories payload. More...
 
static const std::string MOCK_CONTEXT
 Mock Context. More...
 
static const std::string TEST_DATABASE = "SQLiteBluetoothStorageTestDatabase.db"
 Test Database file name. Can be changed if there are conflicts. More...
 
static const std::string BLUETOOTH_JSON
 
static const std::string FILE_EXISTS_ERROR = "Database File " + TEST_DATABASE + " already exists."
 Error message for when the file already exists. More...
 
static const std::string TEST_MAC = "01:23:45:67:89:ab"
 Test MAC Address. More...
 
static const std::string TEST_MAC_2 = "11:23:45:67:89:ab"
 Second Test MAC Address. More...
 
static const std::string TEST_UUID = "650f973b-c2ab-4c6e-bff4-3788cd521340"
 Test UUID. More...
 
static const std::string TEST_UUID_2 = "750f973b-c2ab-4c6e-bff4-3788cd521340"
 Second Test UUID. More...
 
static const std::string TEST_UNKNOWN = "UNKNOWN"
 Test Unknown MAC/Category. More...
 
static const std::string TEST_OTHER = "OTHER"
 Test Other Category. More...
 
static const std::string TEST_PHONE = "PHONE"
 Test Phone Category. More...
 
static const std::string UUID_TABLE_NAME = "uuidMapping"
 Table name. More...
 
static const std::string COLUMN_UUID = "uuid"
 The UUID column. More...
 
static const std::string COLUMN_MAC = "mac"
 The MAC address column. More...
 

Function Documentation

◆ EVENT_PROCESS_DELAY_MS()

static std::chrono::milliseconds alexaClientSDK::acsdkBluetooth::test::EVENT_PROCESS_DELAY_MS ( 500  )
static

◆ fileExists() [1/2]

static bool alexaClientSDK::acsdkBluetooth::test::fileExists ( const std::string &  file)
static

Checks whether a file exists in the file system.

Parameters
fileThe file name.
Returns
Whether the file exists.

◆ fileExists() [2/2]

static bool alexaClientSDK::acsdkBluetooth::test::fileExists ( const std::string &  file)
static

Checks whether a file exists in the file system.

Parameters
fileThe file name.
Returns
Whether the file exists.

◆ INSTANTIATE_TEST_CASE_P()

alexaClientSDK::acsdkBluetooth::test::INSTANTIATE_TEST_CASE_P ( Parameterized  ,
SQLiteBluetoothStorageParameterizedTests  ,
::testing::Values(true, false)   
)

◆ TEST_F() [1/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothMediaInputTransformerTest  ,
test_createWithNullParams   
)

Test that create() returns a nullptr if called with invalid arguments.

◆ TEST_F() [2/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothMediaInputTransformerTest  ,
test_handlePlayCommand   
)

Test that a Play AVRCP command is transformed to playButtonPressed().

◆ TEST_F() [3/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothMediaInputTransformerTest  ,
test_handlePauseCommand   
)

Test that a Pause AVRCP command is transformed to pauseButtonPressed().

◆ TEST_F() [4/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothMediaInputTransformerTest  ,
test_handleNextCommand   
)

Test that a Next AVRCP command is transformed to nextButtonPressed().

◆ TEST_F() [5/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothMediaInputTransformerTest  ,
test_handlePreviousCommand   
)

Test that a Previous AVRCP command is transformed to previousButtonPressed().

◆ TEST_F() [6/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothMediaInputTransformerTest  ,
handlePlayPauseCommand   
)

Test that a Play/Pause Media command is transformed to playButtonPressed().

◆ TEST_F() [7/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothMediaInputTransformerTest  ,
test_unrelatedEvent   
)

Test that an unrelated event does not trigger any calls to the PlaybackRouter.

◆ TEST_F() [8/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( SQLiteBluetoothStorageTest  ,
uninitializedDatabase   
)

Test database not created yet, open should fail.

◆ TEST_F() [9/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( SQLiteBluetoothStorageTest  ,
openDatabase   
)

Test if 2.0 database already created, open should succeed.

◆ TEST_F() [10/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( SQLiteBluetoothStorageTest  ,
openLegacyDatabase   
)

Test if 1.0 database already created, open should succeed.

◆ TEST_F() [11/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( SQLiteBluetoothStorageTest  ,
retrieveCategoryforUnknownUUID   
)

Test retrieving category for a UUID that does not exist after database migration.

◆ TEST_F() [12/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( SQLiteBluetoothStorageTest  ,
insertByMacPostDatabaseUpgrade   
)

Test insertByMac after database migration.

◆ TEST_F() [13/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( SQLiteBluetoothStorageTest  ,
retrieveMacforKnownUUID   
)

Test retrieving mac for a UUID saved before migration after database migration.

◆ TEST_F() [14/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( SQLiteBluetoothStorageTest  ,
retrieveCategoryforKnownUUID   
)

Test retrieving category for a UUID saved before migration after database migration.

◆ TEST_F() [15/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( SQLiteBluetoothStorageTest  ,
retrieveCategoryforKnownMultipleUUID   
)

Test retrieving category for multiple UUIDs saved before migration after database migration.

◆ TEST_F() [16/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( SQLiteBluetoothStorageTest  ,
testEmptyDatabase   
)

Test when a database is empty.

◆ TEST_F() [17/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothTest  ,
test_createBTWithNullParams   
)

Test that create() returns a nullptr if called with invalid arguments.

◆ TEST_F() [18/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothTest  ,
test_createBTWithDuplicateDeviceCategoriesInConnectionRules   
)

Test that create() returns a nullptr if called with an invalid set of device connection rules. Fail due to re-defined device category.

◆ TEST_F() [19/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothTest  ,
test_createBTWithLackOfProfilesInConnectionRules   
)

Test that create() returns a nullptr if called with an invalid set of device connection rules. Fail due to lack of dependent profiles defined in the device connection rule.

◆ TEST_F() [20/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothTest  ,
test_handleConnectByDeviceIdsDirectiveWithTwoA2DPDevices   
)

Test call to handle ConnectByDeviceIds directive with two matched A2DP device UUIDs.

Assumption: A DeviceManager contains m_mockBluetoothDevice1 and m_mockBluetoothDevice2. Both of them belong to DeviceCategory::UNKNOWN. Both devices are in disconnected state. Use case: A ConnectByDeviceIds directive is sent down, whose payload contains the mockBluetoothDevice1 and mockBluetoothDevice2 UUIDs. Expected result: 1) Only one device which connects later(m_mockBluetoothDevice1) will be connected eventually even though both of them were connected successfully. However, The earlier connected device(m_mockBluetoothDevice2 in this case) will be disconnected due to BasicDeviceConnectionRule. 2) The observer should be notified device connection twice and disconnection once. 3) Two ConnectByDeviceIdsSucceed events, both of which have CLOUD as Requester, and one DisconnectDevicesSucceed event, should be sent to cloud.

◆ TEST_F() [21/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothTest  ,
test_handleConnectByDeviceIdsDirectiveWithOnePhoneOneGadget   
)

Test call to handle ConnectByDeviceIds directive with two matched device UUIDs with different device categories.

Assumption: A DeviceManager contains m_mockBluetoothDevice1 and m_mockBluetoothDevice2. m_mockBluetoothDevice1 belongs to DeviceCategory::PHONE, m_mockBluetoothDevice2 belongs to DeviceCategory::GADGET. Both devices are in disconnect state. Use case: A ConnectByDeviceIds directive is sent down, whose payload contains the mockBluetoothDevice1 and mockBluetoothDevice2. Expected result: 1)Both devices should be connected successfully. 2)The observer should be notified deivce connection twice. 3)Two ConnectByDeviceIdsSucceed events, both of which have CLOUD as Requester,should be sent to cloud.

◆ TEST_F() [22/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothTest  ,
test_handleConnectByProfileWithUnmatchedProfileName   
)

Test call to handle ConnectByDeviceProfile directive with an unmatched profile name.

Assumption: A DeviceManager contains m_mockBluetoothDevice1 and m_mockBluetoothDevice2. m_mockBluetoothDevice1 has A2DPSinkInterface and AVRCPTargetInterface services. m_mockBluetoothDevice2 has HIDInterface and SPPInterface services. Use case: A ConnectByProfile directive is sent down, which contains HFPInterface as a profile. Expected result: 1) m_mockBluetoothDevice1 and m_mockBluetoothDevice2 should not be connected successfully. 2) Because no device is connected, the observer should not be notified. 3) One ConnectByDeviceProfileFailed event should be sent to cloud.

◆ TEST_F() [23/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothTest  ,
test_handleConnectByProfileWithMatchedProfileName   
)

Test call to handle ConnectByDeviceProfile directive with a matched profile.

Assumption: A DeviceManager contains m_mockBluetoothDevice1 and m_mockBluetoothDevice2. m_mockBluetoothDevice1 has A2DPSinkInterface and AVRCPTargetInterface services. m_mockBluetoothDevice2 has HIDInterface and SPPInterface services. Use case: A ConnectByProfile directive is sent down, which contains AVRCPTargetInterface as a profile. Expected result: 1) m_mockBluetoothDevice1 should be connected successfully. 2) m_mockBluetoothDevice2 should not be connected. 3) Because m_mockBluetoothDevice is connected, the observer should be notificed once. 4) One ConnectByDeviceProfileSucceeded event should be sent to cloud.

◆ TEST_F() [24/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothTest  ,
test_handleConnectLocal   
)

Test call to handle the local connect() method.

Assumption: A DeviceManager contains m_mockBluetoothDevice1. The device belongs to DeviceCategory::UNKNOWN. The device is in disconnected state. Use case: A local connect() call is made with the MAC address of m_mockBluetoothDevice1. Expected result: 1) m_mockBluetoothDevice1 connects. 2) The observer should be notified of device connection once. 3) One ConnectByDeviceIdsSucceed event.

◆ TEST_F() [25/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothTest  ,
DISABLED_test_handlePairDevices   
)

Test call to handle PairDevices directive with matched device UUIDs. Assumption: A DeviceManager contains m_mockBluetoothDevice1 and m_mockBluetoothDevice2. m_mockBluetoothDevice1 belongs to DeviceCategory::PHONE, which follows BasicDeviceConnectionRule. m_mockBluetoothDevice2 belongs to DeviceCategory::GADGET, which follows GadgetConnectionRule. Use case: A PairDevices directive is sent down, whose payload contains m_mockBluetoothDevice1 and m_mockBluetoothDevice2. Expected result: 1) Both devices should be paired successfully. 2) Based on the connection rule (m_mockBluetoothDevice1 follows BasicDeviceConnectionRule, m_mockBluetoothDevice2 follows GadgetConnectionRule), m_mockBluetoothDevice1 should be connected successfully. 3) A sequence of {PAIR_DEVICES_SUCCEEDED, CONNECT_BY_DEVICE_IDS_SUCCEEDED, PAIR_DEVICES_SUCCEEDED) should be sent to cloud. a. {PAIR_DEVICES_SUCCEEDED, CONNECT_BY_DEVICE_IDS_SUCCEEDED} are sent when Bluetooth CapabilityAgent tries to pair m_mockBluetoothDevice1. b. {PAIR_DEVICES_SUCCEEDED} is sent when Bluetooth CapabilityAgent tries to pair m_mockBluetoothDevice2.

◆ TEST_F() [26/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothTest  ,
test_handlePairLocal   
)

Test call to handle the local pair() method. Assumption: A DeviceManager contains m_mockBluetoothDevice1. m_mockBluetoothDevice1 belongs to DeviceCategory::PHONE, which follows BasicDeviceConnectionRule. Use case: A local pair() call is made with the MAC address of m_mockBluetoothDevice1. Expected result: 1) m_mockBluetoothDevice1 pairs and connects. 2) The observer should be notified of device connection once. 3) One PairDevicesSucceeded and one ConnectByDeviceIdsSucceed event.

◆ TEST_F() [27/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothTest  ,
test_handleUnpairDevices   
)

Test call to handle UnpairDevices directive with matched device UUIDs.

Assumption: A DeviceManager contains m_mockBluetoothDevice1 and m_mockBluetoothDevice2. m_mockBluetoothDevice1 belongs to DeviceCategory::PHONE, whcih follows BasicDeviceConnectionRule. m_mockBluetoothDevice2 belongs to DeviceCategory::GADGET, which follows GadgetConnectionRule. Both devices are in paired and connected state. Use case: First a PairDevices directive is sent down, whose payload contains m_mockBluetoothDevice1 and m_mockBluetoothDevice2. Then a UnpairDevices directive is sent down, whose payload contains m_mockBluetoothDevice1 and m_mockBluetoothDevice2. Expected result: 1) Both m_mockBluetoothDevice1 and m_mockBluetoothDevice2 should be unpaired successfully. 2) Based on the connection rule, both m_mockBluetoothDevice1 and m_mockBluetoothDevice2 should be diconnected successfully. 3) Events: A sequence of {DISCONNECT_DEVICES_SUCCEEDED, UNPAIR_DEVICES_SUCCEEDED, DISCONNECT_DEVICES_SUCCEEDED, UNPAIR_DEVICES_SUCCEEDED} should be sent to cloud: a. {DISCONNECT_DEVICES_SUCCEEDED, UNPAIR_DEVICES_SUCCEEDED} are sent when Bluetooth CapabilityAgents tries to unpair m_mockBluetoothDevice1. b. {DISCONNECT_DEVICES_SUCCEEDED, UNPAIR_DEVICES_SUCCEEDED} are sent when Bluetooth CapabilityAgents tries to unpair m_mockBluetoothDevice2.

◆ TEST_F() [28/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothTest  ,
test_handleUnpairLocal   
)

Test call to handle the local unpair() method. Assumption: A DeviceManager contains m_mockBluetoothDevice1. m_mockBluetoothDevice1 belongs to DeviceCategory::PHONE, which follows BasicDeviceConnectionRule. Use case: A local unpair() call is made with the MAC address of m_mockBluetoothDevice1. Expected result: 1) m_mockBluetoothDevice1 disconnects and unpairs. 2) The observer should be notified of device disconnection once. 3) One DisconnectDevicesSucceeded and one UnpairDevicesSucceeded event.

◆ TEST_F() [29/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothTest  ,
test_handleDisconnectDevices   
)

Test call to handle DisconnectDevices directive with matched device UUIDs.

Assumption: A DeviceManager contains m_mockBluetoothDevice1 and m_mockBluetoothDevice2. Both devices are in paired and connected state. Use case: A DisconnectDevices directive is sent down, whose payload contains m_mockBluetoothDevice1 and m_mockBluetoothDevice2. Expected result: 1) Both m_mockBluetoothDevice1 and m_mockBluetoothDevice2 should be disconnected successfully. 2) The observer should be notified the device disconnection once. 3) Events: A sequnce of {DISCONNECT_DEVICES_SUCCEEDED, DISCONNECT_DEVICES_SUCCEEDED} should be sent to cloud. One for m_mockBluetoothDevice1, one for m_mockBluetoothDevice2.

◆ TEST_F() [30/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothTest  ,
test_handleDisconnectLocal   
)

Test call to handle the local disconnect() method.

Assumption: A DeviceManager contains m_mockBluetoothDevice1. The device belongs to DeviceCategory::UNKNOWN. The device is in connected state. Use case: A local disconnect() call is made with the MAC address of m_mockBluetoothDevice1. Expected result: 1) m_mockBluetoothDevice1 disconnects. 2) The observer should be notified of device disconnection once. 3) One DisconnectDevicesSucceeded event.

◆ TEST_F() [31/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothTest  ,
test_handleSetDeviceCategories   
)

Test call to handle SetDeviceCategories directive with matched device UUID.

Assumption: A DeviceManager contains m_mockBluetoothDevice1 and m_mockBluetoothDevice2. Both of them belong to DeviceCategory::UNKNOWN Use case: A SetDeviceCategories directive is sent down, whose payload contains m_mockBluetoothDevice1 (need to be set to DeviceCategory::PHONE) and m_mockBluetoothDevice2 (need to be set to DeviceCategory::GADGET). Expected result: 1) Both devices are set the assigned device category successfully. 2) Events: A sequnce of {SET_DEVICE_CATEGORIES_SUCCEEDED, SET_DEVICE_CATEGORIES_SUCCEEDED} should be sent to cloud. One for m_mockBluetoothDevice1, one for m_mockBluetoothDevice2.

◆ TEST_F() [32/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothTest  ,
test_contentDucksUponReceivingBackgroundFocus   
)

◆ TEST_F() [33/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothTest  ,
test_contentUnducksUponReceivingForegroundOrNoneFocus   
)

◆ TEST_F() [34/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothTest  ,
test_streamingStateChange   
)

Test streaming state change of multiple device connections.

Assumption: A DeviceManager contains m_mockBluetoothDevice1 and m_mockBluetoothDevice2. m_mockBluetoothDevice1 belongs to DeviceCategory::AUDIO_VIDEO. m_mockBluetoothDevice2 belongs to DeviceCategory::PHONE. Use case: m_mockBluetoothDevice1 initiates connection and starts streaming audio. Then m_mockBluetoothDevice2 initiates connection. Expected Result: 1) m_mockBluetoothDevice1 should connect. A StreamingStarted event should be sent. 2) When m_mockBluetoothDevice2 connects, m_mockBluetoothDevice1 should be disconnected. A StreamingEnded event should be sent.

◆ TEST_F() [35/35]

alexaClientSDK::acsdkBluetooth::test::TEST_F ( BluetoothTest  ,
test_focusStateChange   
)

Test focus state change of barge-in scenario.

Assumption: A DeviceManager contains m_mockBluetoothDevice3, which belongs to DeviceCategory::PHONE. Use case:

  1. m_mockBluetoothDevice3 initiates connection. Stream audio from m_mockBluetoothDevice3.
  2. A job(e.g, TTS) barge-in, which moves Bluetooth to background. Exepected Result:
  1. m_mockBluetoothDevice3 should connect and start streaming audio. It should acquire focus.
  2. m_mockBluetoothDevice3 should pause streaming audio. However, it should NOT release focus.

◆ TEST_P() [1/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_createInvalidConfigurationRoot   
)

Tests the create function with an invalid root.

◆ TEST_P() [2/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_createValidConfigurationRoot   
)

Tests creating a database object.

◆ TEST_P() [3/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_createDatabaseSucceeds   
)

Test creating a valid DB. This is implicitly tested in the SetUp() function, but we formally test it here.

◆ TEST_P() [4/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_createExistingDatabaseFails   
)

Test that creating an existing DB fails.

◆ TEST_P() [5/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_openExistingDatabaseSucceeds   
)

Test opening an existing database.

◆ TEST_P() [6/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_clearOnOneRowSucceeds   
)

Test clearing the table with one row.

◆ TEST_P() [7/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_clearOnMultipleRowsSucceeds   
)

Test clearing the table with multiple rows.

◆ TEST_P() [8/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_clearOnEmptySucceeds   
)

Test clearing the table when it's already empty.

◆ TEST_P() [9/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_getUuidWithOneSucceeds   
)

Test getUuid with one row containing UUID.

◆ TEST_P() [10/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_getUuidWithMultipleSucceeds   
)

Test getUuid with multiple rows, one of which contains the UUID.

◆ TEST_P() [11/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_getUuidNoMatchingFails   
)

Test getUuid with no matching UUID.

◆ TEST_P() [12/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_getMacWithOneSucceeds   
)

Test getMac with one row containing MAC.

◆ TEST_P() [13/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_getMacWithMultipleSucceeds   
)

Test getMac with multiple rows, one of which contains the MAC.

◆ TEST_P() [14/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_getMacNoMatchingFails   
)

Test getMac with no matching MAC.

◆ TEST_P() [15/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
getCategoryWithOneSucceeds   
)

Test getCategory with one row containing Unknown Category.

◆ TEST_P() [16/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
getCategoryWithMultipleSucceeds   
)

Test getCategory with multiple rows, two of which contains UNKNOWN, one is updated to PHONE.

◆ TEST_P() [17/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
getCategoryWithMultipleInsertByMacSucceeds   
)

Test getCategory with multiple rows, two of which contains UNKNOWN, one is updated to PHONE, verify insertByMac preserves the category.

◆ TEST_P() [18/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
getCategoryNoMatchingFails   
)

Test getCategory with no matching category for given uuid.

◆ TEST_P() [19/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_getMacToUuidWithOneRowSucceeds   
)

Test getMacToUuid with one row.

◆ TEST_P() [20/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_getMacToUuidWithMultipleRowsSucceeds   
)

Test getMacToUuid with multiple expected.

◆ TEST_P() [21/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_getMacToUuidWithEmptySucceeds   
)

Test getMacToUuid when empty.

◆ TEST_P() [22/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_getUuidToMacWithOneRowSucceeds   
)

Test getUuidToMac with one row.

◆ TEST_P() [23/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_getUuidToMacWithMultipleRowsSucceeds   
)

Test getUuidToMac with multiple expected.

◆ TEST_P() [24/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_getUuidToMacWithEmptySucceeds   
)

Test getUuidToMac when empty.

◆ TEST_P() [25/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
getUuidToCategoryWithOneRowSucceeds   
)

Test getUuidToCategory with one row.

◆ TEST_P() [26/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
getUuidToCategoryWithOneRowUpdateCategorySucceeds   
)

Test getUuidToCategory with one row, updated category to PHONE.

◆ TEST_P() [27/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
getUuidToCategoryWithMultipleRowsSucceeds   
)

Test getUuidToCategory with multiple expected.

◆ TEST_P() [28/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
getUuidToCategoryWithEmptySucceeds   
)

Test getUuidToCategory when empty.

◆ TEST_P() [29/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
getMacToCategoryWithOneRowSucceeds   
)

Test getMacToCategory with one row.

◆ TEST_P() [30/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
getMacToCategoryWithOneRowUpdateCategorySucceeds   
)

Test getMacToCategory with one row, updated category to PHONE.

◆ TEST_P() [31/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
getMacToCategoryWithMultipleRowsSucceeds   
)

Test getMacToCategory with multiple expected.

◆ TEST_P() [32/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
getMacToCategoryWithEmptySucceeds   
)

Test getMacToCategory when empty.

◆ TEST_P() [33/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_getOrderedMacAscending   
)

Test getOrderedMac and retrieve the macs in ascending insertion order (oldest first).

◆ TEST_P() [34/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_getOrderedMacDescending   
)

Test getOrderedMac and retrieve the macs in descending insertion order (newest first).

◆ TEST_P() [35/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
updateByCategorySucceeds   
)

Test updateByCategory succeeds.

◆ TEST_P() [36/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
updateByCategoryNoMatchingFails   
)

Test updateByCategory with no matching uuid.

◆ TEST_P() [37/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_insertByMacSucceeds   
)

Test insertByMac succeeds.

◆ TEST_P() [38/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_insertByMacDuplicateFails   
)

Test insertByMac existing fails.

◆ TEST_P() [39/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_insertByMacOverwriteSucceeds   
)

Test insertByMac with overwrite succeeds.

◆ TEST_P() [40/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_removeExistingSucceeds   
)

Test remove succeeds.

◆ TEST_P() [41/41]

alexaClientSDK::acsdkBluetooth::test::TEST_P ( SQLiteBluetoothStorageParameterizedTests  ,
test_removeNonExistingSucceeds   
)

Test remove on non-existing record succeeds.

◆ WAIT_TIMEOUT_MS()

static std::chrono::milliseconds alexaClientSDK::acsdkBluetooth::test::WAIT_TIMEOUT_MS ( 1000  )
static

Wait timeout.

Variable Documentation

◆ BLUETOOTH_JSON [1/2]

const std::string alexaClientSDK::acsdkBluetooth::test::BLUETOOTH_JSON
static
Initial value:
= R"(
{
"bluetooth" : {
"databaseFilePath":")" + TEST_DATABASE + R"("
}
}
)"
static const std::string TEST_DATABASE
Test Database file name. Can be changed if there are conflicts.
Definition: SQLiteBluetoothStorageTest.cpp:39

◆ BLUETOOTH_JSON [2/2]

const std::string alexaClientSDK::acsdkBluetooth::test::BLUETOOTH_JSON
static
Initial value:
= R"(
{
"bluetooth" : {
"databaseFilePath":")" + TEST_DATABASE + R"("
}
}
)"
static const std::string TEST_DATABASE
Test Database file name. Can be changed if there are conflicts.
Definition: BluetoothTest.cpp:120

◆ BLUETOOTH_STATE

const NamespaceAndName alexaClientSDK::acsdkBluetooth::test::BLUETOOTH_STATE {NAMESPACE_BLUETOOTH, "BluetoothState"}
static

THe Bluetooth state portion of the Context.

◆ CLOUD_REQUESTER_VALUE

const std::string alexaClientSDK::acsdkBluetooth::test::CLOUD_REQUESTER_VALUE = "CLOUD"
static

JSON value for the cloud requester.

◆ COLUMN_MAC

const std::string alexaClientSDK::acsdkBluetooth::test::COLUMN_MAC = "mac"
static

The MAC address column.

◆ COLUMN_UUID

const std::string alexaClientSDK::acsdkBluetooth::test::COLUMN_UUID = "uuid"
static

The UUID column.

◆ CONNECT_BY_DEVICE_IDS_DIRECTIVE

const std::string alexaClientSDK::acsdkBluetooth::test::CONNECT_BY_DEVICE_IDS_DIRECTIVE = "ConnectByDeviceIds"
static

ConnectByDevice directive.

◆ CONNECT_BY_DEVICE_IDS_SUCCEEDED

const std::string alexaClientSDK::acsdkBluetooth::test::CONNECT_BY_DEVICE_IDS_SUCCEEDED = "ConnectByDeviceIdsSucceeded"
static

The ConnectByDeviceIdSucceeded event name.

◆ CONNECT_BY_PROFILE_DIRECTIVE

const std::string alexaClientSDK::acsdkBluetooth::test::CONNECT_BY_PROFILE_DIRECTIVE = "ConnectByProfile"
static

ConnectByProfile directive.

◆ CONNECT_BY_PROFILE_FAILED

const std::string alexaClientSDK::acsdkBluetooth::test::CONNECT_BY_PROFILE_FAILED = "ConnectByProfileFailed"
static

The ConnectByProfileFailed event name.

◆ CONNECT_BY_PROFILE_SUCCEEDED

const std::string alexaClientSDK::acsdkBluetooth::test::CONNECT_BY_PROFILE_SUCCEEDED = "ConnectByProfileSucceeded"
static

The ConnectByProfileSucceeded event name.

◆ DEVICE_REQUESTER_VALUE

const std::string alexaClientSDK::acsdkBluetooth::test::DEVICE_REQUESTER_VALUE = "DEVICE"
static

JSON value for the device requester.

◆ DISCONNECT_DEVICES_DIRECTIVE

const std::string alexaClientSDK::acsdkBluetooth::test::DISCONNECT_DEVICES_DIRECTIVE = "DisconnectDevices"
static

DisconnectDevice directive.

◆ DISCONNECT_DEVICES_SUCCEEDED

const std::string alexaClientSDK::acsdkBluetooth::test::DISCONNECT_DEVICES_SUCCEEDED = "DisconnectDevicesSucceeded"
static

The DisconnectDeviceSucceeded event name.

◆ FILE_EXISTS_ERROR [1/2]

const std::string alexaClientSDK::acsdkBluetooth::test::FILE_EXISTS_ERROR = "Database File " + TEST_DATABASE + " already exists."
static

Error message for when the file already exists.

◆ FILE_EXISTS_ERROR [2/2]

const std::string alexaClientSDK::acsdkBluetooth::test::FILE_EXISTS_ERROR = "Database File " + TEST_DATABASE + " already exists."
static

Error message for when the file already exists.

◆ MESSAGE_EVENT_KEY

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

JSON key for the event section of a message.

◆ MESSAGE_HEADER_KEY

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

JSON key for the header section of a message.

◆ MESSAGE_NAME_KEY

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

JSON key for the name section of a message.

◆ MOCK_CONTEXT

const std::string alexaClientSDK::acsdkBluetooth::test::MOCK_CONTEXT
static

Mock Context.

◆ NAMESPACE_BLUETOOTH

const std::string alexaClientSDK::acsdkBluetooth::test::NAMESPACE_BLUETOOTH = "Bluetooth"
static

Namespace of Bluetooth.

◆ PAIR_DEVICES_DIRECTIVE

const std::string alexaClientSDK::acsdkBluetooth::test::PAIR_DEVICES_DIRECTIVE = "PairDevices"
static

PairDevice directive.

◆ PAIR_DEVICES_SUCCEEDED

const std::string alexaClientSDK::acsdkBluetooth::test::PAIR_DEVICES_SUCCEEDED = "PairDevicesSucceeded"
static

The PairDeviceSucceeded event name.

◆ PAYLOAD_KEY

const std::string alexaClientSDK::acsdkBluetooth::test::PAYLOAD_KEY = "payload"
static

JSON key for the payload section of a message.

◆ REQUESTER_KEY

const std::string alexaClientSDK::acsdkBluetooth::test::REQUESTER_KEY = "requester"
static

JSON key for the requester section of a message.

◆ SCAN_DEVICES_REPORT

const std::string alexaClientSDK::acsdkBluetooth::test::SCAN_DEVICES_REPORT = "ScanDevicesReport"
static

The ScanDevicesUpdated event name.

◆ SET_DEVICE_CATEGORIES

const std::string alexaClientSDK::acsdkBluetooth::test::SET_DEVICE_CATEGORIES = "SetDeviceCategories"
static

SetDeviceCategories directive.

◆ SET_DEVICE_CATEGORIES_SUCCEEDED

const std::string alexaClientSDK::acsdkBluetooth::test::SET_DEVICE_CATEGORIES_SUCCEEDED = "SetDeviceCategoriesSucceeded"
static

The SetDeviceCategoriesSucceeded event name.

◆ STREAMING_ENDED

const std::string alexaClientSDK::acsdkBluetooth::test::STREAMING_ENDED = "StreamingEnded"
static

The StreamingEnded event name.

◆ STREAMING_STARTED

const std::string alexaClientSDK::acsdkBluetooth::test::STREAMING_STARTED = "StreamingStarted"
static

The StreamingStarted event name.

◆ TAG

const std::string alexaClientSDK::acsdkBluetooth::test::TAG {"BluetoothTest"}
static

String to identify log entries originating from this file.

◆ TEST_BLUETOOTH_DEVICE_MAC

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_BLUETOOTH_DEVICE_MAC = "01:23:45:67:89:ab"
static

Test Bluetooth device mac address 1.

◆ TEST_BLUETOOTH_DEVICE_MAC_2

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_BLUETOOTH_DEVICE_MAC_2 = "11:23:45:67:89:ab"
static

Test Bluetooth device mac address 2.

◆ TEST_BLUETOOTH_DEVICE_MAC_3

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_BLUETOOTH_DEVICE_MAC_3 = "21:23:45:67:89:ab"
static

Test Bluetooth device mac address 3.

◆ TEST_BLUETOOTH_FRIENDLY_NAME

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_BLUETOOTH_FRIENDLY_NAME = "test_friendly_name_1"
static

Test Bluetooth device friendly name 1.

◆ TEST_BLUETOOTH_FRIENDLY_NAME_2

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_BLUETOOTH_FRIENDLY_NAME_2 = "test_friendly_name_2"
static

Test Bluetooth device friendly name 2.

◆ TEST_BLUETOOTH_FRIENDLY_NAME_3

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_BLUETOOTH_FRIENDLY_NAME_3 = "test_friendly_name_3"
static

Test Bluetooth device friendly name 3.

◆ TEST_BLUETOOTH_UUID

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_BLUETOOTH_UUID = "650f973b-c2ab-4c6e-bff4-3788cd521340"
static

Test Bluetooth device uuid 1.

◆ TEST_BLUETOOTH_UUID_2

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_BLUETOOTH_UUID_2 = "650f973b-c2ab-4c6e-bff4-3788cd521341"
static

Test Bluetooth device uuid 2.

◆ TEST_BLUETOOTH_UUID_3

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_BLUETOOTH_UUID_3 = "650f973b-c2ab-4c6e-bff4-3788cd521342"
static

Test Bluetooth device uuid 3.

◆ TEST_CONNECT_BY_DEVICE_IDS_PAYLOAD

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_CONNECT_BY_DEVICE_IDS_PAYLOAD
static
Initial value:
= R"(
{
"devices" : [{
"uniqueDeviceId":")" + TEST_BLUETOOTH_UUID + R"(",
"friendlyName" :")" + TEST_BLUETOOTH_FRIENDLY_NAME + R"("
}, {"uniqueDeviceId":")" + TEST_BLUETOOTH_UUID_2 + R"(",
"friendlyName" :")" + TEST_BLUETOOTH_FRIENDLY_NAME_2 + R"("
}]
}
)"
static const std::string TEST_BLUETOOTH_UUID_2
Test Bluetooth device uuid 2.
Definition: BluetoothTest.cpp:108
static const std::string TEST_BLUETOOTH_UUID
Test Bluetooth device uuid 1.
Definition: BluetoothTest.cpp:99
static const std::string TEST_BLUETOOTH_FRIENDLY_NAME_2
Test Bluetooth device friendly name 2.
Definition: BluetoothTest.cpp:105
static const std::string TEST_BLUETOOTH_FRIENDLY_NAME
Test Bluetooth device friendly name 1.
Definition: BluetoothTest.cpp:96

ConnectByDeviceIds payload.

◆ TEST_CONNECT_BY_PROFILE_PAYLOAD_1

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_CONNECT_BY_PROFILE_PAYLOAD_1
static
Initial value:
= R"(
{
"profile" : {
"name":")" + TEST_UNMATCHED_PROFILE_NAME + R"(",
"version" :")" + TEST_PROFILE_VERSION + R"("
}
}
)"
static const std::string TEST_UNMATCHED_PROFILE_NAME
Test unmatched profile name.
Definition: BluetoothTest.cpp:231
static const std::string TEST_PROFILE_VERSION
Test profile version.
Definition: BluetoothTest.cpp:237

ConnectByDeviceProfile payload 1.

◆ TEST_CONNECT_BY_PROFILE_PAYLOAD_2

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_CONNECT_BY_PROFILE_PAYLOAD_2
static
Initial value:
= R"(
{
"profile" : {
"name":")" + TEST_MATCHED_PROFILE_NAME + R"(",
"version" :")" + TEST_PROFILE_VERSION + R"("
}
}
)"
static const std::string TEST_PROFILE_VERSION
Test profile version.
Definition: BluetoothTest.cpp:237
static const std::string TEST_MATCHED_PROFILE_NAME
Test matched profile name.
Definition: BluetoothTest.cpp:234

ConnectByDeviceProfile payload 2.

◆ TEST_DATABASE [1/2]

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_DATABASE = "SQLiteBluetoothStorageTestDatabase.db"
static

Test Database file name. Can be changed if there are conflicts.

◆ TEST_DATABASE [2/2]

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_DATABASE = "BluetoothCATest.db"
static

Test Database file name. Can be changed if there are conflicts.

◆ TEST_DISCONNECT_DEVICES_PAYLOAD

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_DISCONNECT_DEVICES_PAYLOAD
static
Initial value:
= R"(
{
"devices" : [{
"uniqueDeviceId":")" + TEST_BLUETOOTH_UUID + R"("
}, {
"uniqueDeviceId":")" + TEST_BLUETOOTH_UUID_2 + R"("
}]
}
)"
static const std::string TEST_BLUETOOTH_UUID_2
Test Bluetooth device uuid 2.
Definition: BluetoothTest.cpp:108
static const std::string TEST_BLUETOOTH_UUID
Test Bluetooth device uuid 1.
Definition: BluetoothTest.cpp:99

DisconnectDevices payload.

◆ TEST_MAC

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_MAC = "01:23:45:67:89:ab"
static

Test MAC Address.

◆ TEST_MAC_2

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_MAC_2 = "11:23:45:67:89:ab"
static

Second Test MAC Address.

◆ TEST_MATCHED_PROFILE_NAME

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_MATCHED_PROFILE_NAME = "AVRCP"
static

Test matched profile name.

◆ TEST_MESSAGE_ID

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_MESSAGE_ID = "MessageId_Test"
static

Test message id.

◆ TEST_MESSAGE_ID_2

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_MESSAGE_ID_2 = "MessageId_Test_2"
static

Test message id.

◆ TEST_OTHER

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_OTHER = "OTHER"
static

Test Other Category.

◆ TEST_PAIR_DEVICES_PAYLOAD

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_PAIR_DEVICES_PAYLOAD
static
Initial value:
= R"(
{
"devices" : [{
"uniqueDeviceId":")" + TEST_BLUETOOTH_UUID + R"("
}, {
"uniqueDeviceId":")" + TEST_BLUETOOTH_UUID_2 + R"("
}]
}
)"
static const std::string TEST_BLUETOOTH_UUID_2
Test Bluetooth device uuid 2.
Definition: BluetoothTest.cpp:108
static const std::string TEST_BLUETOOTH_UUID
Test Bluetooth device uuid 1.
Definition: BluetoothTest.cpp:99

PairDevices payload.

◆ TEST_PHONE

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_PHONE = "PHONE"
static

Test Phone Category.

◆ TEST_PROFILE_VERSION

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_PROFILE_VERSION = "1"
static

Test profile version.

◆ TEST_SET_DEVICE_CATEGORIES_PAYLOAD

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_SET_DEVICE_CATEGORIES_PAYLOAD
static
Initial value:
= R"(
{
"devices" : [{
"uniqueDeviceId":")" + TEST_BLUETOOTH_UUID + R"(",
"deviceCategory": "PHONE"
}, {
"uniqueDeviceId":")" + TEST_BLUETOOTH_UUID_2 + R"(",
"deviceCategory": "GADGET"
}]
}
)"
static const std::string TEST_BLUETOOTH_UUID_2
Test Bluetooth device uuid 2.
Definition: BluetoothTest.cpp:108
static const std::string TEST_BLUETOOTH_UUID
Test Bluetooth device uuid 1.
Definition: BluetoothTest.cpp:99

SetDeviceCategories payload.

◆ TEST_UNKNOWN

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_UNKNOWN = "UNKNOWN"
static

Test Unknown MAC/Category.

◆ TEST_UNMATCHED_PROFILE_NAME

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_UNMATCHED_PROFILE_NAME = "HFP"
static

Test unmatched profile name.

◆ TEST_UNPAIR_DEVICES_PAYLOAD

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_UNPAIR_DEVICES_PAYLOAD
static
Initial value:
= R"(
{
"devices" : [{
"uniqueDeviceId":")" + TEST_BLUETOOTH_UUID + R"("
}, {
"uniqueDeviceId":")" + TEST_BLUETOOTH_UUID_2 + R"("
}]
}
)"
static const std::string TEST_BLUETOOTH_UUID_2
Test Bluetooth device uuid 2.
Definition: BluetoothTest.cpp:108
static const std::string TEST_BLUETOOTH_UUID
Test Bluetooth device uuid 1.
Definition: BluetoothTest.cpp:99

UnpairDevices payload.

◆ TEST_UUID

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_UUID = "650f973b-c2ab-4c6e-bff4-3788cd521340"
static

Test UUID.

◆ TEST_UUID_2

const std::string alexaClientSDK::acsdkBluetooth::test::TEST_UUID_2 = "750f973b-c2ab-4c6e-bff4-3788cd521340"
static

Second Test UUID.

◆ UNPAIR_DEVICES_DIRECTIVE

const std::string alexaClientSDK::acsdkBluetooth::test::UNPAIR_DEVICES_DIRECTIVE = "UnpairDevices"
static

UnpairDevice directive.

◆ UNPAIR_DEVICES_SUCCEEDED

const std::string alexaClientSDK::acsdkBluetooth::test::UNPAIR_DEVICES_SUCCEEDED = "UnpairDevicesSucceeded"
static

The UnpairDeviceSucceeded event name.

◆ UUID_TABLE_NAME

const std::string alexaClientSDK::acsdkBluetooth::test::UUID_TABLE_NAME = "uuidMapping"
static

Table name.

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