Example #1
0
        public void ShouldSetAllPropertiesWhenCreatingATokenLineAndOnlyTheLineIsSupplied()
        {
            var line      = new[] { new StringToken(TokenType.Word, 1, 1, 1, "hello") };
            var tokenLine = new TokenLine(line);

            CollectionAssert.AreEqual(line, tokenLine.GetAll());
            CollectionAssert.AreEqual(new TokenLine[] { }, tokenLine.Children.GetAll());
        }
Example #2
0
        public void ShouldSetAllPropertiesWhenCreatingATokenLine()
        {
            var line      = new[] { new StringToken(TokenType.Word, 1, 1, 1, "hello") };
            var children  = new TokenLine[] { };
            var tokenLine = new TokenLine(line, children);

            CollectionAssert.AreEqual(line, tokenLine.GetAll());
            CollectionAssert.AreEqual(children, tokenLine.Children.GetAll());
        }