public void TestParsingMultilineStringContent() { string[] multilineContent = MultilineStringContentLine.Split('\n'); var tokenizer = new ContentTokenizer(); foreach (string contentLine in multilineContent) { var contentTokens = tokenizer.Tokenize(contentLine); bool hasHexString = contentTokens.Any(t => t.Type == TokenType.HexString); Assert.True(hasHexString); } }
public void TestTokenizeAttribs() { var attribTokener = new ContentTokenizer(); var attribTokens = attribTokener.Tokenize(BasicString); Assert.NotEmpty(attribTokens); Assert.Equal(TokenType.DictStart, attribTokens.First().Type); Assert.Equal(TokenType.DictEnd, attribTokens.Last().Type); // Check absence of whitespace tokens bool hasSpaceTokens = attribTokens.Any(t => t.Type == TokenType.Space); Assert.False(hasSpaceTokens); }