Boo.BooLangStudioSpecs.WhenParsingMalformedStringTokensWithNoClosingQuotes.Helper C# (CSharp) Method

Helper() public method

public Helper ( string rawCodeString, int start, int end ) : void
rawCodeString string
start int
end int
return void
        public void Helper(string rawCodeString, int start, int end)
        {
            BuildTokens(rawCodeString);

            List<TokenInfo> stringTokens = new List<TokenInfo>(from i in tokens
                                                               where i.Type == TokenType.String
                                                               select i);
            Assert.True(stringTokens.Count == 1, "Not expected string token count! Expected 1, Actual: " + stringTokens.Count.ToString());
            Assert.True(stringTokens[0].StartIndex == start, "string token start index mismatch! Expected "+start.ToString()+", Actual: " + stringTokens[0].StartIndex.ToString());
            Assert.True(stringTokens[0].EndIndex == end, "string token end index mismatch! Expected "+end.ToString()+", Actual: " + stringTokens[0].EndIndex.ToString());
        }