Esempio n. 1
0
        public void CorrectlyIdentifiesText()
        {
            var interpreter = new HearInterpreter();
            var context     = new SkillFlowInterpretationContext(new SkillFlowInterpretationOptions());

            context.Components.Push(new SceneInstructions());
            Assert.True(interpreter.CanInterpret("hear test {", context));
        }
Esempio n. 2
0
        public void CreatesComponentWithMultiplePhraseCorrectly()
        {
            var interpreter = new HearInterpreter();
            var result      = interpreter.Interpret("hear test,do the test,testing {",
                                                    new SkillFlowInterpretationContext(new SkillFlowInterpretationOptions()));
            var hear = Assert.IsType <Hear>(result.Component);

            Assert.Equal(3, hear.Phrases.Count);
        }
Esempio n. 3
0
        public void CreatesComponentWithSinglePhraseCorrectly()
        {
            var interpreter = new HearInterpreter();
            var result      = interpreter.Interpret("hear test {",
                                                    new SkillFlowInterpretationContext(new SkillFlowInterpretationOptions()));
            var hear   = Assert.IsType <Hear>(result.Component);
            var phrase = Assert.Single(hear.Phrases);

            Assert.Equal("test", phrase);
        }
Esempio n. 4
0
        public void CorrectlyIdentifiesFalseText()
        {
            var interpreter = new HearInterpreter();

            Assert.False(interpreter.CanInterpret("hearing", new SkillFlowInterpretationContext(new SkillFlowInterpretationOptions())));
        }