public void PropertyInterpreterIdentifiesCandidatesCorrectly() { var interpreter = new VisualPropertyInterpreter(); var context = new SkillFlowInterpretationContext(new SkillFlowInterpretationOptions()); context.Components.Push(new Visual()); Assert.True(interpreter.CanInterpret("template:''", context)); }
public void InterpreterCreatesProperly() { var interpreter = new VisualPropertyInterpreter(); var context = new SkillFlowInterpretationContext(new SkillFlowInterpretationOptions()); context.Components.Push(new Visual()); var result = interpreter.Interpret("template:'test'", context); Assert.NotNull(result.Component); var component = Assert.IsType <VisualProperty>(result.Component); Assert.Equal("template", component.Key); Assert.Equal("test", component.Value); }