Skip to content
Discussion options

You must be logged in to vote

Something like this:

      string input = "5 <REDACTED> Dye kits";
      IEnumerable<MarkupToken> tokens = MarkupLexer.Tokenize(input);
      RootNode actual = MarkupParser.Parse(tokens);

      await Assert.That(actual)
          .IsNotNull()
          .And.Member(a => a.Children, children => children.HasCount(2));

      await Assert.That(actual.Children.ElementAt(0))
          .IsTypeOf<TextNode>()
          .And.Member(t => t.Text, text => text.IsEqualTo("5 "));

      await Assert.That(actual.Children.ElementAt(1))
          .IsTypeOf<TextNode>()
          .And.Member(t => t.Text, text => text.IsEqualTo(" Dye kits"));

or

      string input = "<c=@reminder>This coat hides leg armor.<c>";

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sliekens
Comment options

Answer selected by sliekens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants