public void DecreaseCorrectlyIdentifiesText() { var interpreter = new IncrementInterpreter(); var context = new SkillFlowInterpretationContext(new SkillFlowInterpretationOptions()); context.Components.Push(new SceneInstructions()); Assert.True(interpreter.CanInterpret("decrease test to 3", context)); }
public void DecreaseCreatesComponentCorrectly() { var interpreter = new IncrementInterpreter(); var result = interpreter.Interpret("decrease test by 3", new SkillFlowInterpretationContext(new SkillFlowInterpretationOptions())); var instruction = Assert.IsType <Decrease>(result.Component); Assert.Equal("test", instruction.Variable); Assert.Equal(3, instruction.Amount); }
public void DecreaseCorrectlyIdentifiesFalseText() { var interpreter = new IncrementInterpreter(); Assert.False(interpreter.CanInterpret("decrease test to test", new SkillFlowInterpretationContext(new SkillFlowInterpretationOptions()))); }