assertEquals(34, editResult.caretPositionAfterEdit);
}
public void testOptimizeCatchAll2()
{
final FormulaDocument doc = new FormulaDocument();
doc.setText("=MESSAGE(\"Test\";;;;;;)");
final FunctionInformation fn = doc.getFunctionForPosition(1);
final ParameterUpdateEvent event = new ParameterUpdateEvent(this, 3, "[Some parameter]", true);
String text = doc.getText();
final FunctionParameterEditHelper.EditResult editResult =
FunctionParameterEditHelper.buildFormulaText(event, fn, text);
assertEquals("=MESSAGE(\"Test\";;;[Some parameter])", editResult.text);
assertEquals(34, editResult.caretPositionAfterEdit);