Tests.Tests.TestConditionalChoiceInWeave C# (CSharp) Метод

TestConditionalChoiceInWeave() приватный Метод

private TestConditionalChoiceInWeave ( ) : void
Результат void
        public void TestConditionalChoiceInWeave()
        {
            var storyStr =
                @"
- start
 {
    - true: * [go to a stitch] -> a_stitch
 }
- gather shouldn't be seen
-> END

= a_stitch
    result
    -> END
                ";

            Story story = CompileString(storyStr);

            // Extra newline is because there's a choice object sandwiched there,
            // so it can't be absorbed :-/
            Assert.AreEqual("start\n", story.Continue());
            Assert.AreEqual(1, story.currentChoices.Count);

            story.ChooseChoiceIndex(0);

            Assert.AreEqual("result\n", story.Continue());
        }
Tests