Exemplo n.º 1
0
        public void FillBackgroundLine()
        {
            var buffer = new ConsoleBuffer(3);

            buffer.FillBackgroundLine(Line.Vertical(1, 0, 3), Red);
            buffer.FillBackgroundLine(Line.Horizontal(0, 1, 3), Green);

            var c0 = new ConsoleChar();
            var cr = new ConsoleChar {
                BackgroundColor = Red
            };
            var cg = new ConsoleChar {
                BackgroundColor = Green
            };

            buffer.GetLine(0).Should().Equal(c0, cr, c0);
            buffer.GetLine(1).Should().Equal(cg, cg, cg);
            buffer.GetLine(2).Should().Equal(c0, cr, c0);
        }
Exemplo n.º 2
0
        public void FillBackgroundLine ()
        {
            var buffer = new ConsoleBuffer(3);

            buffer.FillBackgroundLine(Line.Vertical(1, 0, 3), Red);
            buffer.FillBackgroundLine(Line.Horizontal(0, 1, 3), Green);

            var c0 = new ConsoleChar();
            var cr = new ConsoleChar { BackgroundColor = Red };
            var cg = new ConsoleChar { BackgroundColor = Green };

            buffer.GetLine(0).Should().Equal(c0, cr, c0);
            buffer.GetLine(1).Should().Equal(cg, cg, cg);
            buffer.GetLine(2).Should().Equal(c0, cr, c0);
        }