Пример #1
0
        public void Conditional_Group_Does_Propagate_Breaks_Within_Options()
        {
            var doc = Doc.ConditionalGroup(
                "ThisContentIsTooLong",
                Doc.Group("1", Doc.Line, "2", Doc.HardLine, "3")
                );

            PrintedDocShouldBe(doc, $"1{NewLine}2{NewLine}3", 10);
        }
Пример #2
0
        public void Conditional_Group_Should_Print_Group_That_Fits()
        {
            var doc = Doc.ConditionalGroup(
                "tooLong tooLong",
                Doc.Concat("tooLong", Doc.HardLine, "tooLong")
                );

            PrintedDocShouldBe(doc, $"tooLong{NewLine}tooLong", 10);
        }
Пример #3
0
        public void Conditional_Group_Does_Not_Propagate_Breaks_To_Parent()
        {
            var doc = Doc.Group(
                Doc.ConditionalGroup(
                    Doc.Concat("1", Doc.Line, "2"),
                    Doc.Concat("11", Doc.HardLine, "22")
                    )
                );

            PrintedDocShouldBe(doc, "1 2", 10);
        }
Пример #4
0
        public void Conditional_Group_Prints_As_Group()
        {
            var doc = Doc.ConditionalGroup(Doc.Concat("1", Doc.Line, "2"));

            PrintedDocShouldBe(doc, "1 2", 10);
        }
Пример #5
0
        public void Conditional_Group_Should_Print_Basic_Group()
        {
            var doc = Doc.ConditionalGroup("short");

            PrintedDocShouldBe(doc, "short");
        }