public void DoesNotWriteIfNoIndentLevel()
            {
                // Given
                StringBuilder builder = new StringBuilder();
                OutputFile    output  = new OutputFileWriter(new StringWriter(builder));

                // When
                output.IndentString = "..";
                output.IndentLevel  = 0;
                output.WriteIndent();

                // Then
                Assert.AreEqual(string.Empty, builder.ToString());
            }
            public void WritesTheCurrentIndentStringMultipleTimes()
            {
                // Given
                StringBuilder builder  = new StringBuilder();
                OutputFile    output   = new OutputFileWriter(new StringWriter(builder));
                string        expected = @"....";

                // When
                output.IndentString = "..";
                output.IndentLevel  = 2;
                output.WriteIndent();

                // Then
                Assert.AreEqual(expected, builder.ToString());
            }
            public void DoesNotResetIndentWriteFlag()
            {
                // Given
                StringBuilder builder  = new StringBuilder();
                OutputFile    output   = new OutputFileWriter(new StringWriter(builder));
                string        expected = @"A
....B
C
";

                // When
                output.IndentString = "..";
                output.WriteLine("A");
                using (output.WithIndent())
                {
                    output.WriteIndent();
                    output.WriteLine("B");
                }
                output.WriteLine("C");

                // Then
                Assert.AreEqual(expected, builder.ToString());
            }