Пример #1
0
        public void DifferentEmptyLines(string unformattedCode, uint initialIndents, string expected)
        {
            string    lineEnding = "\n";
            string    indent     = " ";
            EmptyLine line       = new EmptyLine(unformattedCode, indent, lineEnding);

            uint indents = initialIndents;

            Assert.Equal(expected, line.Format(ref indents));
        }
Пример #2
0
        public void DifferentEmptyLines(
            string unformattedCode, uint initialIndents, string expected
            )
        {
            Global.indentation = " ";
            Global.lineEnding  = "\n";
            EmptyLine line = new EmptyLine(unformattedCode);

            uint indents = initialIndents;

            Assert.Equal(expected, line.Format(ref indents));
        }
Пример #3
0
        public void EmptyLine_ContentChange_IsIgnored()
        {
            var emptyLine = new EmptyLine();

            emptyLine.Content.Should().Be(Environment.NewLine);

            emptyLine
            .AppendContent("new part 2", "blah1")
            .AddContent("new part", "blah");

            emptyLine.Content.Should().Be(Environment.NewLine);

            emptyLine.ClearContent();

            emptyLine.Content.Should().Be(Environment.NewLine);
        }
Пример #4
0
 public void EmptyLine(EmptyLine emptyLine)
 {
     Append("\n");
 }
Пример #5
0
 public void EmptyLine(EmptyLine emptyLine)
 {
 }