public void Iterate_EmptyNodeTypes_SingleIterate()
        {
            var iteration = new SyntacticParseIterateResult(
                Enumerable.Empty<ISyntacticNode>(),
                Enumerable.Empty<ISyntacticNodeType>(),
                Enumerable.Empty<TokenSyntacticNode>());

            var rules = Enumerable.Empty<IBlock>();
            var result = iteration.Iterate(rules).ToArray();

            Assert.That(result.Count(), Is.EqualTo(1));
            Assert.That(result.First(), Is.EqualTo(iteration));
        }
        public void NodesAndNodeTypesAndTokenNodes_Stub_Same()
        {
            var nodes = new[]
            {
                MockRepository.GenerateStub<ISyntacticNode>(),
                MockRepository.GenerateStub<ISyntacticNode>()
            };
            var nodeTypes = new[]
            {
                MockRepository.GenerateStub<ISyntacticNodeType>(),
                MockRepository.GenerateStub<ISyntacticNodeType>()
            };
            var tokenNodes = new[]
            {
                new TokenSyntacticNode(MockRepository.GenerateStub<IToken>()),
                new TokenSyntacticNode(MockRepository.GenerateStub<IToken>())
            };

            var iterate = new SyntacticParseIterateResult(nodes, nodeTypes, tokenNodes);

            Assert.That(iterate.Nodes,Is.SameAs(nodes));
            Assert.That(iterate.NodeTypes, Is.SameAs(nodeTypes));
            Assert.That(iterate.TokenNodes, Is.SameAs(tokenNodes));
        }