public void Views_can_be_appended_to_output(OutputMode outputMode) { var view = new StringsView(new[] { "1", "2", "3" }); _terminal.Append(view, outputMode); _terminal .RenderOperations() .Should() .BeEquivalentSequenceTo( new TextRendered("1", new Point(0, 0)), new TextRendered("2", new Point(0, 1)), new TextRendered("3" + Environment.NewLine, new Point(0, 2)) ); }
public void ConsoleView_keeps_track_of_position_so_that_multiple_WriteLine_statements_do_not_overwrite_the_target_region( OutputMode outputMode ) { var renderer = new ConsoleRenderer(_terminal, outputMode); var view = new StringsView(new[] { "1", "2", "3" }); view.Render(renderer, new Region(3, 5, 1, 3)); _terminal .RenderOperations() .Should() .BeEquivalentSequenceTo( new TextRendered("1", new Point(3, 5)), new TextRendered("2", new Point(3, 6)), new TextRendered("3", new Point(3, 7)) ); }