void (boolean toStart, @NotNull String before, @Nullable VisualPosition positionBefore, @NotNull String after, @Nullable VisualPosition positionAfter) { configureFromFileText(getTestName(false) + ".txt", before); if (positionBefore != null) mouse().clickAt(positionBefore.line, positionBefore.column); if (toStart) { deleteToLineStart(); } else { deleteToLineEnd(); } checkResultByText(after); if (positionAfter != null) { assertEquals(positionAfter, getEditor().getCaretModel().getVisualPosition()); } }