Esempio n. 1
0
        public void BufferBuilderTests()
        {
            var buffer = new TestScreenBuffer(7, 4, '.', Colors.WhiteOnBlack, "the", "cats", "howled");
            var actual = buffer.ToString();

            actual.Should().Be(
                "the...." +
                "cats..." +
                "howled." +
                ".......");
        }
Esempio n. 2
0
        public void WhenScrollingWholeScreen_ScrollDownBy2_Should_ScrollTheWholeScreenDown2Lines()
        {
            var screen = new TestScreenBuffer(7, 5, '.', Colors.WhiteOnBlack,
                                              "the....",
                                              "gray...",
                                              "cats...",
                                              "howled.",
                                              "crazily"
                                              );
            var scroller = new Scroller(screen.Buffer, 7, 4, '.', Colors.WhiteOnBlack);

            scroller.ScrollDown(2, 0, 0, 7, 4);

            screen.ToString().Should().Be(
                "cats..." +
                "howled." +
                "crazily" +
                "......." +
                "......."
                );
        }
Esempio n. 3
0
        public void WhenScrollingWholeScreen_ScrollDownBy1_Should_ScrollTheWholeScreenDown1Line()
        {
            var screen = new TestScreenBuffer(7, 5, '.', Colors.WhiteOnBlack,
                                              "the1234",
                                              "gray[=]",
                                              "cats567",
                                              "howled8",
                                              "9012345"
                                              );
            var scroller = new Scroller(screen.Buffer, 7, 4, '.', Colors.WhiteOnBlack);

            scroller.ScrollDown(1, 0, 0, 7, 4);

            screen.ToString().Should().Be(
                "gray[=]" +
                "cats567" +
                "howled8" +
                "9012345" +
                "......."
                );
        }