/// <summary> /// Sets up the basic unit tests with set strings and controls. /// </summary> private void SetupTests( out EditorViewController controller, out Caret caret, out LineBuffer lineBuffer) { // Set up Gtk so we can create the view. Application.Init(); // Set up an editor without a cached renderer and a memory buffer // we can easily verify. var view = new EditorView(); caret = view.Caret; lineBuffer = new MemoryLineBuffer(); controller = view.Controller; var renderer = new LineBufferRenderer(view, lineBuffer); view.SetRenderer(renderer); // Create three lines of text. TextActions.InsertText(controller, DefaultLine); TextActions.InsertParagraph(controller); TextActions.InsertText(controller, DefaultLine); TextActions.InsertParagraph(controller); TextActions.InsertText(controller, DefaultLine); }
public void Setup() { // Set up an editor without a cached renderer and a memory buffer // we can easily verify. editor = new EditorView(); controller = editor.Controller; buffer = new MemoryLineBuffer(); renderer = new LineBufferRenderer(editor, buffer); editor.SetRenderer(renderer); }
public void Setup() { buffer = new MemoryLineBuffer(); }