Tests.Tests.CompileString C# (CSharp) Method

CompileString() protected method

protected CompileString ( string str, bool countAllVisits = false, bool testingErrors = false ) : Story
str string
countAllVisits bool
testingErrors bool
return Story
        protected Story CompileString(string str, bool countAllVisits = false, bool testingErrors = false)
        {
            _testingErrors = testingErrors;
            _errorMessages.Clear();
            _warningMessages.Clear();

            InkParser parser = new InkParser(str, null, TestErrorHandler);
            var parsedStory = parser.Parse();
            parsedStory.countAllVisits = countAllVisits;

            Story story = parsedStory.ExportRuntime(TestErrorHandler);
            Assert.AreNotEqual(null, story);

            // Convert to json and back again
            if (_mode == TestMode.JsonRoundTrip)
            {
                var jsonStr = story.ToJsonString();
                story = new Story(jsonStr);
            }

            return story;
        }
Tests