feat: Implement dummy PersistenceAdapter for TestInput #98
+22
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Implement dummy PersistenceAdapter and set it when building dummyAttributesManager object that is used in TestInput class.
Motivation and Context
Sometimes I want to use TestInput class with my actual ControlManager for e2e test. But sometimes I can't use it because of lacking persistenceAdapter in TestInput. When my implementation tries to refer persistentAttributes in AttributesManager, it raises
Cannot get PersistentAttributes without PersistenceManager
because there is nopersistenceAdapter
in TestInput.https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/blob/2.0.x/ask-sdk-core/lib/attributes/AttributesManagerFactory.ts#L60
So I want to implement dummy persistence adapter class and introduce it to TestInput.
Testing
You can refer to and operate persistentAttributes in handler implementation when using TestInput as input of the Control.
Types of changes
Checklist
License