Exemplo n.º 1
0
        public void CorrectlyIdentifiesText()
        {
            var interpreter = new SetInterpreter();
            var context     = new SkillFlowInterpretationContext(new SkillFlowInterpretationOptions());

            context.Components.Push(new SceneInstructions());
            Assert.True(interpreter.CanInterpret("set test to 3", context));
        }
Exemplo n.º 2
0
        public void CreatesComponentCorrectly()
        {
            var interpreter = new SetInterpreter();
            var result      = interpreter.Interpret("set test to 3",
                                                    new SkillFlowInterpretationContext(new SkillFlowInterpretationOptions()));
            var instruction = Assert.IsType <Set>(result.Component);

            Assert.Equal("test", instruction.Variable);
            Assert.Equal(3.ToString(), instruction.Value);
        }