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

Classes

class  DefaultEndpointBuilderTest
 Test harness for EndpointBuilder class. More...
 
class  EndpointAttributeValidationTest
 
class  EndpointBuilderTest
 Test harness for EndpointBuilder class. More...
 
class  EndpointRegistrationManagerTest
 
class  EndpointTest
 Test harness for Endpoint class. More...
 

Typedefs

using RegistrationResult = EndpointRegistrationManager::RegistrationResult
 
using DeregistrationResult = EndpointRegistrationManager::DeregistrationResult
 
using UpdateResult = EndpointRegistrationManager::UpdateResult
 

Functions

 TEST_F (DefaultEndpointBuilderTest, test_createDefaultEndpointBuilderInterface)
 
 TEST_F (DefaultEndpointBuilderTest, test_createDefaultEndpointBuilderInterfaceInvalidBuilder)
 
 TEST_F (DefaultEndpointBuilderTest, test_cannotUpdateDefaultAttributes)
 
 TEST_F (DefaultEndpointBuilderTest, test_withDisplayCategory)
 
 TEST_F (DefaultEndpointBuilderTest, test_withConnections)
 
 TEST_F (DefaultEndpointBuilderTest, test_withCookies)
 
 TEST_F (DefaultEndpointBuilderTest, test_withPowerControllerNotEnabled)
 
 TEST_F (DefaultEndpointBuilderTest, test_withToggleControllerNotEnabled)
 
 TEST_F (DefaultEndpointBuilderTest, test_withModeControllerNotEnabled)
 
 TEST_F (DefaultEndpointBuilderTest, test_withRangeControllerNotEnabled)
 
 TEST_F (DefaultEndpointBuilderTest, test_withCapability)
 
 TEST_F (DefaultEndpointBuilderTest, test_withCapabilityInterface)
 
 TEST_F (DefaultEndpointBuilderTest, test_withCapabilityConfiguration)
 
 TEST_F (DefaultEndpointBuilderTest, test_buildSuccess)
 
 TEST_F (DefaultEndpointBuilderTest, test_buildDuplicate)
 
 TEST_F (EndpointAttributeValidationTest, test_validEndpointIdLengthBoundaries)
 
 TEST_F (EndpointAttributeValidationTest, test_invalidEndpointIdLengthBoundariesReturnsFalse)
 
 TEST_F (EndpointAttributeValidationTest, test_validFriendlyNameLengthBoundaries)
 
 TEST_F (EndpointAttributeValidationTest, test_invalidFriendlyNameLengthBoundariesReturnsFalse)
 
 TEST_F (EndpointAttributeValidationTest, test_validDescriptionLengthBoundaries)
 
 TEST_F (EndpointAttributeValidationTest, test_invalidDescriptionLengthBoundariesReturnsFalse)
 
 TEST_F (EndpointAttributeValidationTest, test_validManufacturerNameLengthBoundaries)
 
 TEST_F (EndpointAttributeValidationTest, test_invalidManufacturerNameLengthBoundariesReturnsFalse)
 
 TEST_F (EndpointAttributeValidationTest, test_validManufacturerAttributeBoundary)
 
 TEST_F (EndpointAttributeValidationTest, test_invalidManufacturerAttributeBoundaryReturnsFalse)
 
 TEST_F (EndpointAttributeValidationTest, test_validModelAttributeBoundary)
 
 TEST_F (EndpointAttributeValidationTest, test_invalidModelAttributeBoundaryReturnsFalse)
 
 TEST_F (EndpointAttributeValidationTest, test_validSerialNumberAttributeBoundary)
 
 TEST_F (EndpointAttributeValidationTest, test_invalidSerialNumberAttributeBoundaryReturnsFalse)
 
 TEST_F (EndpointAttributeValidationTest, test_validFirmwareVersionAttributeBoundary)
 
 TEST_F (EndpointAttributeValidationTest, test_invalidFirmwareVersionAttributeBoundaryReturnsFalse)
 
 TEST_F (EndpointAttributeValidationTest, test_validSoftwareVersionAttributeBoundary)
 
 TEST_F (EndpointAttributeValidationTest, test_invalidSoftwareVersionAttributeBoundaryReturnsFalse)
 
 TEST_F (EndpointAttributeValidationTest, test_validCustomIdentifierAttributeBoundary)
 
 TEST_F (EndpointAttributeValidationTest, test_invalidCustomIdentifierAttributeBoundaryReturnsFalse)
 
 TEST_F (EndpointAttributeValidationTest, test_validCookiesSize)
 
 TEST_F (EndpointAttributeValidationTest, test_invalidCookiesSizeReturnsFalse)
 
 TEST_F (EndpointAttributeValidationTest, test_validConnectionsReturnsTrue)
 
 TEST_F (EndpointAttributeValidationTest, test_invalidConnectionsReturnsFalse)
 
 TEST_F (EndpointBuilderTest, test_createEndpointBuilderNullDeviceInfo)
 
 TEST_F (EndpointBuilderTest, test_createEndpointBuilderNullContextManager)
 
 TEST_F (EndpointBuilderTest, test_createEndpointBuilderNullExceptionSender)
 
 TEST_F (EndpointBuilderTest, test_createEndpointBuilderNullAlexaMessageSender)
 
 TEST_F (EndpointBuilderTest, test_createEndpointBuilderSuccess)
 
 TEST_F (EndpointBuilderTest, test_createEndpointBuilderWithoutPointerSuccess)
 
 TEST_F (EndpointBuilderTest, test_withConfigurationFinalized)
 
 TEST_F (EndpointBuilderTest, test_withDerivedEndpointIdLengthExceeded)
 
 TEST_F (EndpointBuilderTest, test_withDerivedEndpointIdSuccess)
 
 TEST_F (EndpointBuilderTest, test_attributesUpdatedSuccess)
 
 TEST_F (EndpointBuilderTest, test_withEndpointIdInvalid)
 
 TEST_F (EndpointBuilderTest, test_withFriendlyNameInvalid)
 
 TEST_F (EndpointBuilderTest, test_withDescriptionInvalid)
 
 TEST_F (EndpointBuilderTest, test_withManufacturerNameInvalid)
 
 TEST_F (EndpointBuilderTest, test_withDisplayCategoryInvalid)
 
 TEST_F (EndpointBuilderTest, test_withAdditionalAttributesInvalid)
 
 TEST_F (EndpointBuilderTest, test_withConnectionsInvalid)
 
 TEST_F (EndpointBuilderTest, test_withCookiesInvalid)
 
 TEST_F (EndpointBuilderTest, test_withPowerControllerNotEnabled)
 
 TEST_F (EndpointBuilderTest, test_withToggleControllerNotEnabled)
 
 TEST_F (EndpointBuilderTest, test_withModeControllerNotEnabled)
 
 TEST_F (EndpointBuilderTest, test_withRangeControllerNotEnabled)
 
 TEST_F (EndpointBuilderTest, test_withCapabilitySuccess)
 
 TEST_F (EndpointBuilderTest, test_withCapabilityNullConfigurationInterface)
 
 TEST_F (EndpointBuilderTest, test_withCapabilityNullDirectiveHandler)
 
 TEST_F (EndpointBuilderTest, test_withCapabilityInvalidConfiguration)
 
 TEST_F (EndpointBuilderTest, test_withCapabilityUsingInterfaceSuccess)
 
 TEST_F (EndpointBuilderTest, test_withCapabilityConfigurationNullConfigurationInterface)
 
 TEST_F (EndpointBuilderTest, test_withCapabilityConfigurationNullConfiguration)
 
 TEST_F (EndpointBuilderTest, test_withCapabilityConfigurationSuccess)
 
 TEST_F (EndpointBuilderTest, test_buildSuccess)
 
 TEST_F (EndpointBuilderTest, test_buildDuplicate)
 
 TEST_F (EndpointRegistrationManagerTest, test_createWithNullParametersFails)
 
 TEST_F (EndpointRegistrationManagerTest, test_shutdownResolvesPendingPromises)
 
 TEST_F (EndpointRegistrationManagerTest, test_registerEndpointSucceeds)
 
 TEST_F (EndpointRegistrationManagerTest, test_deregisterEndpointSucceeds)
 
 TEST_F (EndpointRegistrationManagerTest, test_updateEndpointSucceeds)
 
 TEST_F (EndpointRegistrationManagerTest, test_registerExsitingEndpointFails)
 
 TEST_F (EndpointRegistrationManagerTest, test_deregisterDefaultEndpointFails)
 
 TEST_F (EndpointRegistrationManagerTest, test_registerEndpointWhenCapabilityRegistrationEndsWithFatalErrorFails)
 
 TEST_F (EndpointRegistrationManagerTest, test_registerNullEndpointFailsImmediately)
 
 TEST_F (EndpointRegistrationManagerTest, test_updateEndpointThatDoesNotExistFailsImmediately)
 
 TEST_F (EndpointRegistrationManagerTest, test_deregisterEndpointThatDoesNotExistFailsImmediately)
 
 TEST_F (EndpointRegistrationManagerTest, test_registerEndpointWhileRegistrationInProgressFails)
 
 TEST_F (EndpointRegistrationManagerTest, test_registerEndpointWhileDeregistrationInProgressFails)
 
 TEST_F (EndpointRegistrationManagerTest, test_registerEndpointWhileUpdateInProgressFails)
 
 TEST_F (EndpointRegistrationManagerTest, test_deregisterEndpointWhileDeregistrationInProgressFails)
 
 TEST_F (EndpointRegistrationManagerTest, test_deregisterEndpointWhileRegistrationInProgressFails)
 
 TEST_F (EndpointRegistrationManagerTest, test_deregisterEndpointWhileUpdateInProgressFails)
 
 TEST_F (EndpointRegistrationManagerTest, test_updateEndpointWhileRegistrationInProgressFails)
 
 TEST_F (EndpointRegistrationManagerTest, test_updateEndpointWhileDeregistrationInProgressFails)
 
 TEST_F (EndpointRegistrationManagerTest, test_updateEndpointWhileUpdateInProgressFails)
 
 TEST_F (EndpointRegistrationManagerTest, test_registerEndpointWithInvalidHandlerFails)
 
 TEST_F (EndpointRegistrationManagerTest, test_registerEndpointWithInvalidCapabilityFails)
 
 TEST_F (EndpointRegistrationManagerTest, test_revertWhenUpdateExistingEndpointFailsDueToCapabilityUpdateEndWithFatalFailure)
 
 TEST_F (EndpointRegistrationManagerTest, test_revertWhenUpdateExistingEndpointFailsDueToUpdateEndpointFail)
 
 TEST_F (EndpointRegistrationManagerTest, test_revertWhenDeregisterEndpointFailsDueToCapabilityRegistrationEndWithFatalFailure)
 
 TEST_F (EndpointRegistrationManagerTest, test_revertWhenDeregisterEndpointFailsDueToDirectiveHandlerFailure)
 
 TEST_F (EndpointTest, test_endpointConstructor)
 
 TEST_F (EndpointTest, test_addRequireShutdownObjects)
 
 TEST_F (EndpointTest, test_getEndpointId)
 
 TEST_F (EndpointTest, test_updateWithValidAttributesAndInvalidEndpointId)
 
 TEST_F (EndpointTest, test_updateWithInvalidAttributesAndValidEndpointAttributes)
 
 TEST_F (EndpointTest, test_updateSuccess)
 
 TEST_F (EndpointTest, test_updateDuplicateCapabilities)
 
 TEST_F (EndpointTest, test_updateSameInterfaceDifferentInstances)
 
 TEST_F (EndpointTest, test_addCapabilityNullDirectiveHandler)
 
 TEST_F (EndpointTest, test_addCapabilityDuplicate)
 
 TEST_F (EndpointTest, test_addCapabilitySuccess)
 
 TEST_F (EndpointTest, test_removeCapabilityThatDoesNotExist)
 
 TEST_F (EndpointTest, test_removeCapabilitySuccess)
 
 TEST_F (EndpointTest, test_addCapabilityConfigurationDuplicate)
 
 TEST_F (EndpointTest, test_validateEndpointAttributesInvalidEndpointId)
 
 TEST_F (EndpointTest, test_validateEndpointAttributesInvalidFriendlyName)
 
 TEST_F (EndpointTest, test_validateEndpointAttributesInvalidDescription)
 
 TEST_F (EndpointTest, test_validateEndpointAttributesInvalidManufacturerName)
 
 TEST_F (EndpointTest, test_validateEndpointAttributesInvalidAdditionalAttributes)
 
 TEST_F (EndpointTest, test_validateEndpointAttributesInvalidConnections)
 
 TEST_F (EndpointTest, test_validateEndpointAttributesInvalidCookies)
 
 TEST_F (EndpointTest, test_validateEndpointAttributesSuccess)
 

Variables

static const std::shared_ptr< avsCommon::avs::CapabilityConfigurationVALID_CAPABILITY_CONFIGURATION
 
static const std::unordered_set< std::shared_ptr< avsCommon::avs::CapabilityConfiguration > > VALID_CAPABILITY_CONFIGURATION_SET {VALID_CAPABILITY_CONFIGURATION}
 
static const size_t MIN_SIZE = 1
 
static const std::string EMPTY_STRING = ""
 
static const std::shared_ptr< avsCommon::avs::CapabilityConfigurationVALID_CAPABILITY_CONFIGURATION
 
static const std::unordered_set< std::shared_ptr< avsCommon::avs::CapabilityConfiguration > > VALID_CAPABILITY_CONFIGURATION_SET {VALID_CAPABILITY_CONFIGURATION}
 
static const std::unordered_set< std::shared_ptr< avsCommon::avs::CapabilityConfiguration > > INVALID_CAPABILITY_CONFIGURATION_SET {nullptr}
 
static const std::chrono::seconds MY_WAIT_TIMEOUT {2}
 
static const EndpointIdentifier DEFAULT_ENDPOINT_ID = "defaultEndpointId"
 The EndpointIdentifier for a mock default endpoint. More...
 
static const CapabilityConfiguration CAPABILITY_CONFIGURATION
 
static const std::string EMPTY_ID = ""
 
static const std::string EMPTY_STRING = ""
 

Typedef Documentation

◆ DeregistrationResult

◆ RegistrationResult

◆ UpdateResult

Function Documentation

◆ TEST_F() [1/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointAttributeValidationTest  ,
test_validEndpointIdLengthBoundaries   
)

Test for checking valid endpointId.

◆ TEST_F() [2/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointAttributeValidationTest  ,
test_invalidEndpointIdLengthBoundariesReturnsFalse   
)

Test for checking invalid endpointId.

◆ TEST_F() [3/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointAttributeValidationTest  ,
test_validFriendlyNameLengthBoundaries   
)

Test for checking valid endpoint friendly name.

◆ TEST_F() [4/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointAttributeValidationTest  ,
test_invalidFriendlyNameLengthBoundariesReturnsFalse   
)

Test for checking invalid endpoint friendly name.

◆ TEST_F() [5/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointTest  ,
test_endpointConstructor   
)

Tests Endpoint constructor, expecting to successfully create a new Endpoint.

◆ TEST_F() [6/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointAttributeValidationTest  ,
test_validDescriptionLengthBoundaries   
)

Test for checking valid endpoint description field.

◆ TEST_F() [7/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointTest  ,
test_addRequireShutdownObjects   
)

Tests addRequireShutdownObjects, expecting to successfully update require shutdown objects without errors or crashing. Then expects that doShutdown is called from within the endpoint destructor to release resources.

◆ TEST_F() [8/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointAttributeValidationTest  ,
test_invalidDescriptionLengthBoundariesReturnsFalse   
)

Test for checking invalid endpoint description field.

◆ TEST_F() [9/119]

alexaClientSDK::endpoints::test::TEST_F ( DefaultEndpointBuilderTest  ,
test_createDefaultEndpointBuilderInterface   
)

Tests createDefaultEndpointBuilderInterface with valid parameters, expecting to successfully configure and create default endpoint.

◆ TEST_F() [10/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_createEndpointBuilderNullDeviceInfo   
)

Tests create with null device info, expecting create to fail and to return nullptr.

◆ TEST_F() [11/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointTest  ,
test_getEndpointId   
)

Tests getEndpointId, expecting value to be correct.

◆ TEST_F() [12/119]

alexaClientSDK::endpoints::test::TEST_F ( DefaultEndpointBuilderTest  ,
test_createDefaultEndpointBuilderInterfaceInvalidBuilder   
)

Tests createDefaultEndpointBuilderInterface with null parameters, expecting to return nullptr.

◆ TEST_F() [13/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_createEndpointBuilderNullContextManager   
)

Tests create with null context manager, expecting create to fail and to return nullptr.

◆ TEST_F() [14/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointAttributeValidationTest  ,
test_validManufacturerNameLengthBoundaries   
)

Test for checking valid manufacturer name field.

◆ TEST_F() [15/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_createEndpointBuilderNullExceptionSender   
)

Tests create with null exception sender, expecting create to fail and to return nullptr.

◆ TEST_F() [16/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointTest  ,
test_updateWithValidAttributesAndInvalidEndpointId   
)

Tests update with an empty endpoint id, expecting update to fail and to return false.

◆ TEST_F() [17/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointAttributeValidationTest  ,
test_invalidManufacturerNameLengthBoundariesReturnsFalse   
)

Test for checking invalid manufacturer name field.

◆ TEST_F() [18/119]

alexaClientSDK::endpoints::test::TEST_F ( DefaultEndpointBuilderTest  ,
test_cannotUpdateDefaultAttributes   
)

Tests that endpoint id, friendly name, description, manufacturer name, and additional attributes cannot be updated after a default endpoint builder is created.

Note
This test also tests withDerivedEndpointId, withEndpointId, withFriendlyName, withDescription, withManufacturerName, and withAdditionalAttributes.

◆ TEST_F() [19/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_createEndpointBuilderNullAlexaMessageSender   
)

Tests create with null response sender, expecting create to fail and to return nullptr.

◆ TEST_F() [20/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointTest  ,
test_updateWithInvalidAttributesAndValidEndpointAttributes   
)

Tests update with invalid updated attributes (ex: friendly name being an empty string) and valid endpoint data, expecting update to fail and to return false.

◆ TEST_F() [21/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_createEndpointBuilderSuccess   
)

Tests create with correct parameters, expecting to return EndpointBuilder.

◆ TEST_F() [22/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointAttributeValidationTest  ,
test_validManufacturerAttributeBoundary   
)

Test for checking valid manufacturer field.

◆ TEST_F() [23/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_createEndpointBuilderWithoutPointerSuccess   
)

Tests create with correct parameters (using non-shared ptr deviceInfo), expecting to return EndpointBuilder.

◆ TEST_F() [24/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointAttributeValidationTest  ,
test_invalidManufacturerAttributeBoundaryReturnsFalse   
)

Test for checking invalid manufacturer field.

◆ TEST_F() [25/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointTest  ,
test_updateSuccess   
)

Tests update with valid updated attributes and valid endpoint data, expecting update to succeed and to return true.

◆ TEST_F() [26/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_createWithNullParametersFails   
)

◆ TEST_F() [27/119]

alexaClientSDK::endpoints::test::TEST_F ( DefaultEndpointBuilderTest  ,
test_withDisplayCategory   
)

Tests withDisplayCategory with valid parameters, expecting that display category is successfully updated.

◆ TEST_F() [28/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_withConfigurationFinalized   
)

Tests finalizeAttributes, expecting that each attribute remains unchanged.

Note
This test also tests withDerivedEndpointId, withEndpointId, withFriendlyName, withDescription, withManufacturerName, withDisplayCategory, and withAdditionalAttributes.

◆ TEST_F() [29/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointAttributeValidationTest  ,
test_validModelAttributeBoundary   
)

Test for checking valid model field.

◆ TEST_F() [30/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_shutdownResolvesPendingPromises   
)

◆ TEST_F() [31/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointTest  ,
test_updateDuplicateCapabilities   
)

Tests update by first adding a capability through addCapabilityConfiguration, then calling update with the same capability, expecting update to succeed by keeping one copy of the same capability and to return true.

Note
This test also tests addCapabilityConfiguration.

◆ TEST_F() [32/119]

alexaClientSDK::endpoints::test::TEST_F ( DefaultEndpointBuilderTest  ,
test_withConnections   
)

Tests withConnections with valid parameters, expecting that connections are updated successfully.

◆ TEST_F() [33/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointAttributeValidationTest  ,
test_invalidModelAttributeBoundaryReturnsFalse   
)

Test for checking invalid model field.

◆ TEST_F() [34/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointAttributeValidationTest  ,
test_validSerialNumberAttributeBoundary   
)

Test for checking valid serial number field.

◆ TEST_F() [35/119]

alexaClientSDK::endpoints::test::TEST_F ( DefaultEndpointBuilderTest  ,
test_withCookies   
)

Tests withCookies with valid parameters, expecting that cookies are updated successfully.

◆ TEST_F() [36/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointTest  ,
test_updateSameInterfaceDifferentInstances   
)

Tests update by first adding a capability through addCapabilityConfiguration, then calling update with the same capability, expecting update to succeed by still having the remaining copy in the currenCapabilities. Tests updates on both additions to ensure that order does not matter. Tests a remove to ensure that the correct instance is removed after update.

◆ TEST_F() [37/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointAttributeValidationTest  ,
test_invalidSerialNumberAttributeBoundaryReturnsFalse   
)

Test for checking invalid serial number field.

◆ TEST_F() [38/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_withDerivedEndpointIdLengthExceeded   
)

Tests withDerivedEndpointId with an invalid length, expecting endpoint id to remain unchanged.

◆ TEST_F() [39/119]

alexaClientSDK::endpoints::test::TEST_F ( DefaultEndpointBuilderTest  ,
test_withPowerControllerNotEnabled   
)

Tests withPowerController without being enabled, expecting build to fail and to return nullptr.

Note
This function is deprecated use the new withEndpointCapabilitiesBuilder() method instead.

◆ TEST_F() [40/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointAttributeValidationTest  ,
test_validFirmwareVersionAttributeBoundary   
)

Test for checking valid firmwareVersion field.

◆ TEST_F() [41/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_withDerivedEndpointIdSuccess   
)

Tests withDerivedEndpointId, expecting to update endpoint id successfully.

◆ TEST_F() [42/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointAttributeValidationTest  ,
test_invalidFirmwareVersionAttributeBoundaryReturnsFalse   
)

Test for checking invalid firmwareVersion field.

◆ TEST_F() [43/119]

alexaClientSDK::endpoints::test::TEST_F ( DefaultEndpointBuilderTest  ,
test_withToggleControllerNotEnabled   
)

Tests withToggleController without being enabled, expecting build to fail and to return nullptr.

Note
This function is deprecated use the new withEndpointCapabilitiesBuilder() method instead.

◆ TEST_F() [44/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_attributesUpdatedSuccess   
)

Tests that each attribute can be successfully updated when provided with valid input.

Note
This test also tests withEndpointId, withFriendlyName, withDescription, withManufacturerName, withDisplayCategory, withAdditionalAttributes, withConnections, and withCookies. withDerivedEndpointId, is tested separately so that it does not interfere with withEndpointId.

◆ TEST_F() [45/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointAttributeValidationTest  ,
test_validSoftwareVersionAttributeBoundary   
)

Test for checking valid softwareVersion field.

◆ TEST_F() [46/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_registerEndpointSucceeds   
)

◆ TEST_F() [47/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointTest  ,
test_addCapabilityNullDirectiveHandler   
)

Tests addCapability with a null directive handler, expecting addCapability to fail and to return false.

◆ TEST_F() [48/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointAttributeValidationTest  ,
test_invalidSoftwareVersionAttributeBoundaryReturnsFalse   
)

Test for checking invalid softwareVersion field.

◆ TEST_F() [49/119]

alexaClientSDK::endpoints::test::TEST_F ( DefaultEndpointBuilderTest  ,
test_withModeControllerNotEnabled   
)

Tests withModeController without being enabled, expecting build to fail and to return nullptr.

Note
This function is deprecated use the new withEndpointCapabilitiesBuilder() method instead.

◆ TEST_F() [50/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointTest  ,
test_addCapabilityDuplicate   
)

Tests addCapability with a capability duplicate, expecting addCapability to return false, after attempting to add a duplicate.

◆ TEST_F() [51/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointAttributeValidationTest  ,
test_validCustomIdentifierAttributeBoundary   
)

Test for checking valid CustomIdentifier field.

◆ TEST_F() [52/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointTest  ,
test_addCapabilitySuccess   
)

Tests addCapability with valid parameters, expecting addCapability to succeed and to return true.

◆ TEST_F() [53/119]

alexaClientSDK::endpoints::test::TEST_F ( DefaultEndpointBuilderTest  ,
test_withRangeControllerNotEnabled   
)

Tests withRangeController without being enabled, expecting build to fail and to return nullptr.

Note
This function is deprecated use the new withEndpointCapabilitiesBuilder() method instead.

◆ TEST_F() [54/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointAttributeValidationTest  ,
test_invalidCustomIdentifierAttributeBoundaryReturnsFalse   
)

Test for checking invalid CustomIdentifier field.

◆ TEST_F() [55/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointTest  ,
test_removeCapabilityThatDoesNotExist   
)

Tests removeCapability with a capability that does not exist, expecting removeCapability to fail and to return false.

◆ TEST_F() [56/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_deregisterEndpointSucceeds   
)

◆ TEST_F() [57/119]

alexaClientSDK::endpoints::test::TEST_F ( DefaultEndpointBuilderTest  ,
test_withCapability   
)

Tests withCapability with valid parameters, expecting capabilities to be updated successfully.

◆ TEST_F() [58/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointAttributeValidationTest  ,
test_validCookiesSize   
)

Test for checking valid cookie data.

◆ TEST_F() [59/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_withEndpointIdInvalid   
)

Tests withEndpointId with an invalid length, expecting build to fail and to return nullptr.

◆ TEST_F() [60/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointTest  ,
test_removeCapabilitySuccess   
)

Tests removeCapability with a capability that does exist, expecting removeCapability to succeed and to return true.

Note
This test also tests addCapability.

◆ TEST_F() [61/119]

alexaClientSDK::endpoints::test::TEST_F ( DefaultEndpointBuilderTest  ,
test_withCapabilityInterface   
)

Tests withCapability with valid parameters, expecting capabilities to be updated successfully.

◆ TEST_F() [62/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointAttributeValidationTest  ,
test_invalidCookiesSizeReturnsFalse   
)

Test for checking invalid cookie data.

◆ TEST_F() [63/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_withFriendlyNameInvalid   
)

Tests withFriendlyName with an invalid friendly name, expecting build to fail and to return nullptr.

Note
This test specifically does not use createEndpointBuilder.

◆ TEST_F() [64/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointTest  ,
test_addCapabilityConfigurationDuplicate   
)

Tests addCapabilityConfiguration with a duplicate capability configuration. Specifically the first addition should succeed, but the second addition should fail, expecting removeCapability to return false, after attempting to add a duplicate.

◆ TEST_F() [65/119]

alexaClientSDK::endpoints::test::TEST_F ( DefaultEndpointBuilderTest  ,
test_withCapabilityConfiguration   
)

Tests withCapabilityConfiguration with valid parameters, expecting capabilities to be updated successfully.

◆ TEST_F() [66/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointAttributeValidationTest  ,
test_validConnectionsReturnsTrue   
)

Test for checking valid connections data.

◆ TEST_F() [67/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_withDescriptionInvalid   
)

Tests withDescription with an invalid description, expecting build to fail and to return nullptr.

◆ TEST_F() [68/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointTest  ,
test_validateEndpointAttributesInvalidEndpointId   
)

Tests validateEndpointAttributes with an invalid/empty endpoint id, expecting validateEndpointAttributes to fail and to return false.

◆ TEST_F() [69/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_withManufacturerNameInvalid   
)

Tests withManufacturerName with an invalid manufacturer name, expecting build to fail and to return nullptr.

◆ TEST_F() [70/119]

alexaClientSDK::endpoints::test::TEST_F ( DefaultEndpointBuilderTest  ,
test_buildSuccess   
)

Tests build with minimal required valid parameters, expecting to successfully build a default endpoint.

◆ TEST_F() [71/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointTest  ,
test_validateEndpointAttributesInvalidFriendlyName   
)

Tests validateEndpointAttributes with an invalid/empty friendly name, expecting validateEndpointAttributes to fail and to return false.

◆ TEST_F() [72/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointAttributeValidationTest  ,
test_invalidConnectionsReturnsFalse   
)

Test for checking invalid connections data.

◆ TEST_F() [73/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_withDisplayCategoryInvalid   
)

Tests withDisplayCategory with an invalid display category, expecting build to fail and to return nullptr.

◆ TEST_F() [74/119]

alexaClientSDK::endpoints::test::TEST_F ( DefaultEndpointBuilderTest  ,
test_buildDuplicate   
)

Tests build with an already built default endpoint, expecting the build to fail, since only one default endpoint can be built from a single default endpoint builder. Expecting the second call to create a duplicate default endpoint to return nullptr.

◆ TEST_F() [75/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_updateEndpointSucceeds   
)

◆ TEST_F() [76/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointTest  ,
test_validateEndpointAttributesInvalidDescription   
)

Tests validateEndpointAttributes with an invalid/empty description, expecting validateEndpointAttributes to fail and to return false.

◆ TEST_F() [77/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_withAdditionalAttributesInvalid   
)

Tests withAdditionalAttributes with invalid additional attributes, expecting build to fail and to return nullptr.

◆ TEST_F() [78/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointTest  ,
test_validateEndpointAttributesInvalidManufacturerName   
)

Tests validateEndpointAttributes with an invalid/empty manufacturer name, expecting validateEndpointAttributes to fail and to return false.

◆ TEST_F() [79/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_withConnectionsInvalid   
)

Tests withConnections with an invalid connection (ex: every connection key requires a value), expecting build to fail and to return nullptr.

◆ TEST_F() [80/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointTest  ,
test_validateEndpointAttributesInvalidAdditionalAttributes   
)

Tests validateEndpointAttributes with invalid/oversized additional attributes, expecting validateEndpointAttributes to fail and to return false.

◆ TEST_F() [81/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_withCookiesInvalid   
)

Tests withCookies with invalid cookies, expecting build to fail and to return nullptr.

◆ TEST_F() [82/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointTest  ,
test_validateEndpointAttributesInvalidConnections   
)

Tests validateEndpointAttributes with invalid connections, expecting validateEndpointAttributes to fail and to return false.

◆ TEST_F() [83/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_withPowerControllerNotEnabled   
)

Tests withPowerController without being enabled, expecting build to fail and to return nullptr.

Note
This function is deprecated use the new withEndpointCapabilitiesBuilder() method instead.

◆ TEST_F() [84/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointTest  ,
test_validateEndpointAttributesInvalidCookies   
)

Tests validateEndpointAttributes with invalid/oversized cookies, expecting validateEndpointAttributes to fail and to return false.

◆ TEST_F() [85/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_withToggleControllerNotEnabled   
)

Tests withToggleController without being enabled, expecting build to fail and to return nullptr.

Note
This function is deprecated use the new withEndpointCapabilitiesBuilder() method instead.

◆ TEST_F() [86/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_registerExsitingEndpointFails   
)

◆ TEST_F() [87/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointTest  ,
test_validateEndpointAttributesSuccess   
)

Tests validateEndpointAttributes with valid parameters, expecting validateEndpointAttributes to succeed and to return true.

◆ TEST_F() [88/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_withModeControllerNotEnabled   
)

Tests withModeController without being enabled, expecting build to fail and to return nullptr.

Note
This function is deprecated use the new withEndpointCapabilitiesBuilder() method instead.

◆ TEST_F() [89/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_withRangeControllerNotEnabled   
)

Tests withRangeController without being enabled, expecting build to fail and to return nullptr.

Note
This function is deprecated use the new withEndpointCapabilitiesBuilder() method instead.

◆ TEST_F() [90/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_withCapabilitySuccess   
)

Tests withCapability with a valid capability configuration, expecting to update capabilities successfully.

◆ TEST_F() [91/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_deregisterDefaultEndpointFails   
)

◆ TEST_F() [92/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_withCapabilityNullConfigurationInterface   
)

Tests withCapability with a null configuration interface, expecting build to fail and to return nullptr.

◆ TEST_F() [93/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_registerEndpointWhenCapabilityRegistrationEndsWithFatalErrorFails   
)

◆ TEST_F() [94/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_withCapabilityNullDirectiveHandler   
)

Tests withCapability with a null directive handler, expecting build to fail and to return nullptr.

◆ TEST_F() [95/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_withCapabilityInvalidConfiguration   
)

Tests withCapability with an invalid capability configuration, expecting build to fail and to return nullptr.

◆ TEST_F() [96/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_withCapabilityUsingInterfaceSuccess   
)

Tests withCapability with a valid capability configuration, expecting to update capabilities successfully.

◆ TEST_F() [97/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_withCapabilityConfigurationNullConfigurationInterface   
)

Tests withCapabilityConfiguration with a null configuration interface, expecting build to fail and to return nullptr.

◆ TEST_F() [98/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_registerNullEndpointFailsImmediately   
)

◆ TEST_F() [99/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_withCapabilityConfigurationNullConfiguration   
)

Tests withCapabilityConfiguration with a null configuration, expecting build to fail and to return nullptr.

◆ TEST_F() [100/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_updateEndpointThatDoesNotExistFailsImmediately   
)

◆ TEST_F() [101/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_withCapabilityConfigurationSuccess   
)

Tests withCapabilityConfiguration with a valid configuration, expecting to update capability configurations successfully.

◆ TEST_F() [102/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_deregisterEndpointThatDoesNotExistFailsImmediately   
)

◆ TEST_F() [103/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_registerEndpointWhileRegistrationInProgressFails   
)

◆ TEST_F() [104/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_buildSuccess   
)

Tests build with minimal required valid parameters, expecting to successfully build an endpoint.

◆ TEST_F() [105/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointBuilderTest  ,
test_buildDuplicate   
)

Tests build with an already built endpoint, expecting the build to fail, since only one endpoint can be built from a single endpoint builder. Expecting the second call to create a duplicate endpoint to return nullptr.

◆ TEST_F() [106/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_registerEndpointWhileDeregistrationInProgressFails   
)

◆ TEST_F() [107/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_registerEndpointWhileUpdateInProgressFails   
)

◆ TEST_F() [108/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_deregisterEndpointWhileDeregistrationInProgressFails   
)

◆ TEST_F() [109/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_deregisterEndpointWhileRegistrationInProgressFails   
)

Test.

◆ TEST_F() [110/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_deregisterEndpointWhileUpdateInProgressFails   
)

◆ TEST_F() [111/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_updateEndpointWhileRegistrationInProgressFails   
)

Test.

◆ TEST_F() [112/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_updateEndpointWhileDeregistrationInProgressFails   
)

◆ TEST_F() [113/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_updateEndpointWhileUpdateInProgressFails   
)

◆ TEST_F() [114/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_registerEndpointWithInvalidHandlerFails   
)

◆ TEST_F() [115/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_registerEndpointWithInvalidCapabilityFails   
)

◆ TEST_F() [116/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_revertWhenUpdateExistingEndpointFailsDueToCapabilityUpdateEndWithFatalFailure   
)

◆ TEST_F() [117/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_revertWhenUpdateExistingEndpointFailsDueToUpdateEndpointFail   
)

◆ TEST_F() [118/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_revertWhenDeregisterEndpointFailsDueToCapabilityRegistrationEndWithFatalFailure   
)

◆ TEST_F() [119/119]

alexaClientSDK::endpoints::test::TEST_F ( EndpointRegistrationManagerTest  ,
test_revertWhenDeregisterEndpointFailsDueToDirectiveHandlerFailure   
)

Variable Documentation

◆ CAPABILITY_CONFIGURATION

const CapabilityConfiguration alexaClientSDK::endpoints::test::CAPABILITY_CONFIGURATION
static
Initial value:
=
CapabilityConfiguration({"TEST_TYPE", "TEST_INTERFACE_NAME", "2.0"})

◆ DEFAULT_ENDPOINT_ID

const EndpointIdentifier alexaClientSDK::endpoints::test::DEFAULT_ENDPOINT_ID = "defaultEndpointId"
static

The EndpointIdentifier for a mock default endpoint.

◆ EMPTY_ID

const std::string alexaClientSDK::endpoints::test::EMPTY_ID = ""
static

◆ EMPTY_STRING [1/2]

const std::string alexaClientSDK::endpoints::test::EMPTY_STRING = ""
static

◆ EMPTY_STRING [2/2]

const std::string alexaClientSDK::endpoints::test::EMPTY_STRING = ""
static

◆ INVALID_CAPABILITY_CONFIGURATION_SET

const std::unordered_set<std::shared_ptr<avsCommon::avs::CapabilityConfiguration> > alexaClientSDK::endpoints::test::INVALID_CAPABILITY_CONFIGURATION_SET {nullptr}
static

◆ MIN_SIZE

const size_t alexaClientSDK::endpoints::test::MIN_SIZE = 1
static

◆ MY_WAIT_TIMEOUT

const std::chrono::seconds alexaClientSDK::endpoints::test::MY_WAIT_TIMEOUT {2}
static

Constant representing the timeout for test events.

Note
Use a large enough value that should not fail even in slower systems.

◆ VALID_CAPABILITY_CONFIGURATION [1/2]

const std::shared_ptr<avsCommon::avs::CapabilityConfiguration> alexaClientSDK::endpoints::test::VALID_CAPABILITY_CONFIGURATION
static
Initial value:
=
std::make_shared<avsCommon::avs::CapabilityConfiguration>("TEST_TYPE", "TEST_INTERFACE_NAME", "2.0")

◆ VALID_CAPABILITY_CONFIGURATION [2/2]

const std::shared_ptr<avsCommon::avs::CapabilityConfiguration> alexaClientSDK::endpoints::test::VALID_CAPABILITY_CONFIGURATION
static
Initial value:
=
std::make_shared<avsCommon::avs::CapabilityConfiguration>("TEST_TYPE", "TEST_INTERFACE_NAME", "2.0")

◆ VALID_CAPABILITY_CONFIGURATION_SET [1/2]

const std::unordered_set<std::shared_ptr<avsCommon::avs::CapabilityConfiguration> > alexaClientSDK::endpoints::test::VALID_CAPABILITY_CONFIGURATION_SET {VALID_CAPABILITY_CONFIGURATION}
static

◆ VALID_CAPABILITY_CONFIGURATION_SET [2/2]

const std::unordered_set<std::shared_ptr<avsCommon::avs::CapabilityConfiguration> > alexaClientSDK::endpoints::test::VALID_CAPABILITY_CONFIGURATION_SET {VALID_CAPABILITY_CONFIGURATION}
static

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