public void CorrectlyIdentifiesVariable() { var interpreter = new SetInterpreter(); var context = new SkillFlowInterpretationContext(new SkillFlowInterpretationOptions()); context.Components.Push(new SceneInstructions()); Assert.True(interpreter.CanInterpret("set test as testSlot", context)); var test = interpreter.Interpret("set test as testSlot", context); }
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); }