public void IndentLine_NewMethodDefinitionOnPreviousLine_NextLineIsIndented() { CreateFormattingStrategy(); textEditor.Text = "def newMethod\r\n" + ""; IDocumentLine line = textEditorAdapter.Document.GetLine(2); formattingStrategy.IndentLine(textEditorAdapter, line); string text = textEditor.Text; string expectedText = "def newMethod\r\n" + "\t"; Assert.AreEqual(expectedText, text); }
public void NewMethodDefinition() { textEditor.Text = "def newMethod\r\n" + ""; int indentResult = formattingStrategy.IndentLine(textEditor.ActiveTextAreaControl.TextArea, 1); string expectedText = "def newMethod\r\n" + "\t"; Assert.AreEqual(expectedText, textEditor.Text); Assert.AreEqual(1, indentResult); }