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)); }
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); }
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); }
public void CorrectlyIdentifiesFalseText() { var interpreter = new HearInterpreter(); Assert.False(interpreter.CanInterpret("hearing", new SkillFlowInterpretationContext(new SkillFlowInterpretationOptions()))); }