public void DrawRectangleCommandHandlerTestSetUp() { originalOut = Console.Out; stringWriter = new StringWriter(); Console.SetOut(stringWriter); var createCanvas = new CreateCanvasCommandHandler(); createCanvas.ProcessCommand("C 3 4"); rectangleCommandHandler = new DrawRectangleCommandHandler(); emptyCanvasString = MatrixToStringConverter.Convert(new char[6, 5] { { '-', '-', '-', '-', '-' }, { '|', ' ', ' ', ' ', '|' }, { '|', ' ', ' ', ' ', '|' }, { '|', ' ', ' ', ' ', '|' }, { '|', ' ', ' ', ' ', '|' }, { '-', '-', '-', '-', '-' }, }); }
public void FillConnectedAreaCommandHandlerTestSetUp() { originalOut = Console.Out; stringWriter = new StringWriter(); Console.SetOut(stringWriter); var createCanvas = new CreateCanvasCommandHandler(); createCanvas.ProcessCommand("C 3 4"); bucketFillCommandHandler = new FillConnectedAreaCommandHandler(); emptyCanvasString = MatrixToStringConverter.Convert(new char[6, 5] { { '-', '-', '-', '-', '-' }, { '|', ' ', ' ', ' ', '|' }, { '|', ' ', ' ', ' ', '|' }, { '|', ' ', ' ', ' ', '|' }, { '|', ' ', ' ', ' ', '|' }, { '-', '-', '-', '-', '-' } }); }