public void DotConsole_Should_Write_Text_To_The_OutputBuffer()
        {
            //Arrange
            var        actual  = "Hello World";
            DotConsole console = new DotConsole();

            //Act
            var @ref = console.Write(actual);

            //Assert
            //Use the renderer and load the line.
            var exp = console.Renderer.ReadOutput(new Region()
            {
                Left = 0, Top = 0, Height = 1, Width = actual.Length
            });

            CellBuffer.CellBufferDebugView view = new CellBuffer.CellBufferDebugView(exp);

            Assert.AreEqual(view.lines[0], actual);
        }
        public void DotConsole_Should_AlterText_In_The_OutputBuffer()
        {
            //Arrange
            var        line    = "Hello";
            var        actual  = "World";
            DotConsole console = new DotConsole();

            //Act
            var @ref = console.Write(line);

            console.AlterLine(actual, @ref.RelativeColIndex);

            //Assert
            //Use the renderer and load the line.
            var exp = console.Renderer.ReadOutput(new Region()
            {
                Left = 0, Top = @ref.RelativeColIndex, Height = @ref.RelativeRowIndex + 1, Width = line.Length
            });

            CellBuffer.CellBufferDebugView view = new CellBuffer.CellBufferDebugView(exp);

            Assert.AreEqual(view.lines[0], actual);
        }
        public void DotConsole_Should_WriteLine_Of_Text_To_The_OutputBuffer()
        {
            //Arrange
            var        actual  = "Hello World";
            DotConsole console = new DotConsole();

            //Act
            var @ref = console.WriteLine(actual);

            @ref = console.Write(actual);

            //Assert
            //Use the renderer and load the line.
            var exp = console.Renderer.ReadOutput(new Region()
            {
                Left = 0, Top = 0, Height = @ref.RelativeRowIndex + 1, Width = actual.Length
            });

            CellBuffer.CellBufferDebugView view = new CellBuffer.CellBufferDebugView(exp);

            view.lines.ToList()
            .ForEach(line => Assert.AreEqual(line, actual));
        }