Exemple #1
0
        public void ProcessRequest_CreatesSessionAttributesIfNoneExist()
        {
            Story        story      = new Story();
            SpeechNode   speechNode = story.CreateNode("Test");
            SkillRequest request    = new SkillRequest();

            request.Request            = new IntentRequest();
            request.Session            = new Session();
            request.Session.Attributes = null;

            RequestContext requestContext = new RequestContext(request, null, null);
            StoryRuntime   storyRuntime   = new StoryRuntime(requestContext, story);

            storyRuntime.TrySetCurrentNode(0);

            Assert.IsNull(request.Session.Attributes);

            SkillResponse response = storyRuntime.ProcessRequest();

            Assert.IsNotNull(response.SessionAttributes);
            AssertExt.IsNotEmpty(response.SessionAttributes);
        }
Exemple #2
0
 void OnValidate()
 {
     AssertExt.IsNotEmpty(Resources);
 }
Exemple #3
0
 void OnValidate()
 {
     AssertExt.IsNotEmpty(Parts);
     Assert.IsNotNull(Placer);
     Assert.IsNotNull(Rotator);
 }