コード例 #1
0
        public void TestTranslate_OnSpaceToken()
        {
            const string expectedTranslation = " ";
            var          tree = treeBuilder
                                .WithSpace()
                                .Build();

            var translation = treeTranslator.Translate(tree);

            translation.Should().BeEquivalentTo(expectedTranslation);
        }
コード例 #2
0
        public void TestBuildTree_OnSpaceToken()
        {
            var tokens       = new[] { new Token(TokenType.Space, " ") };
            var expectedTree = testTreeBuilder
                               .WithSpace()
                               .Build();

            var tree = builder.BuildTree(tokens);

            tree.Should().BeEquivalentTo(expectedTree);
        }