示例#1
0
        public void TestToStringWithoutHintSpan()
        {
            var span = TextSpan.FromBounds(0, 1);
            var bannerText = "Foo";
            var autoCollapse = true;

            var outliningRegion = new BlockSpan(true, span, 
                bannerText: bannerText, autoCollapse: autoCollapse);

            Assert.Equal("{Span=[0..1), BannerText=\"Foo\", AutoCollapse=True, IsDefaultCollapsed=False}", outliningRegion.ToString());
        }
示例#2
0
        public void TestToStringWithHintSpan()
        {
            var span = TextSpan.FromBounds(0, 1);
            var hintSpan = TextSpan.FromBounds(2, 3);
            var bannerText = "Foo";
            var autoCollapse = true;

            var outliningRegion = new BlockSpan(
                isCollapsible: true, textSpan: span, hintSpan: hintSpan,
                type: BlockTypes.Nonstructural, bannerText: bannerText, autoCollapse: autoCollapse);

            Assert.Equal("{Span=[0..1), HintSpan=[2..3), BannerText=\"Foo\", AutoCollapse=True, IsDefaultCollapsed=False}", outliningRegion.ToString());
        }