public void Render_SingleRenderable_RendersAtGivenLocation()
        {
            var builder = new RendererBuilder();

            var sut = builder.Build();

            sut.Render(new[]
            {
                CreateRenderable(4, 3, '§', 0),
            });

            builder.AssertRowEmpty(0);
            builder.AssertRowEmpty(1);
            builder.OutputLines[2].Should().Be("   §      ");
            builder.AssertRowEmpty(3);
        }
        public void Render_MismatchingXYCoordinates_RendersCellAsExpected(ElementType elementType, char expected)
        {
            var builder = new RendererBuilder();

            var sut = builder.WithCellAt(4, 3, elementType)
                      .Build();

            sut.Render(NoRenderables());

            string leftPadding  = "   ";
            string rightPadding = "      ";

            builder.AssertRowEmpty(0);
            builder.AssertRowEmpty(1);
            builder.OutputLines[2].Should().Be(leftPadding + expected + rightPadding);
            builder.AssertRowEmpty(3);
        }
        public void Render_MultipleRenderablesDifferentLocations_RendersAll()
        {
            var builder = new RendererBuilder();

            var sut = builder.Build();

            sut.Render(new[]
            {
                CreateRenderable(2, 2, '~', 0),
                CreateRenderable(4, 3, '§', 0),
                CreateRenderable(8, 3, '@', 0),
            });

            builder.AssertRowEmpty(0);
            builder.OutputLines[1].Should().Be(" ~        ");
            builder.OutputLines[2].Should().Be("   §   @  ");
            builder.AssertRowEmpty(3);
        }
        public void Render_TopLeftCellWall_RendersCellAsWall()
        {
            var builder = new RendererBuilder();

            var sut = builder.WithWallAt(1, 1)
                      .Build();

            sut.Render(NoRenderables());

            builder.OutputLines[0].Should().Be(WALL_CELL + new string(' ', MAP_COLUMN_COUNT - 1));
            builder.AssertRowEmpty(1);
        }
        public void Render_EntireMapPassageway_AllLines10Spaces()
        {
            var builder = new RendererBuilder();
            var sut     = builder.Build();

            sut.Render(NoRenderables());

            for (int row = 0; row < MAP_ROW_COUNT; row++)
            {
                builder.AssertRowEmpty(row);
            }
        }