public void WriteSpace()
        {
            // arrange
            var stringBuilder = new StringBuilder();
            var writer        = new DocumentWriter(stringBuilder);

            // act
            writer.WriteSpace();

            // assert
            Assert.Equal(" ", stringBuilder.ToString());
        }
Beispiel #2
0
        protected override void VisitDocument(DocumentNode node)
        {
            if (node.Definitions.Any())
            {
                VisitDefinition(node.Definitions.First());

                foreach (IDefinitionNode item in node.Definitions.Skip(1))
                {
                    if (_indent)
                    {
                        _writer.WriteLine();
                        _writer.WriteLine();
                    }
                    else
                    {
                        _writer.WriteSpace();
                    }

                    VisitDefinition(item);
                }
            }
        }