Package org.pentaho.openformula.ui.model2

Examples of org.pentaho.openformula.ui.model2.FormulaDocument.insertString()


  public void testParseFunction() throws BadLocationException
  {
    FormulaDocument doc = new FormulaDocument();
    final String str = "=IF(IF([a];[b];\"C\");[c]; [d]) ";
    doc.insertString(0, str, null);
    final FormulaRootElement element = doc.getRootElement();
    assertEquals("Length", str.length(), doc.getLength());
    assertEquals("Number of elements: ", 17, element.getElementCount());
  }
View Full Code Here


  public void testParseFunctionBad() throws BadLocationException
  {
    FormulaDocument doc = new FormulaDocument();
    final String str = "=IF(IF([a];[b];\"C\"));[c]; [d]) ";
    doc.insertString(0, str, null);
    final FormulaRootElement element = doc.getRootElement();
    assertEquals("Length", str.length(), doc.getLength());
    assertEquals("Number of elements: ", 18, element.getElementCount());
  }
 
View Full Code Here

 
  public void testParseFunctionBad2() throws BadLocationException
  {
    FormulaDocument doc = new FormulaDocument();
    final String str = "=IF(([a];[b];\"C\"));[c]; [d]) ";
    doc.insertString(0, str, null);
    final FormulaRootElement element = doc.getRootElement();
    assertEquals("Length", str.length(), doc.getLength());
    assertEquals("Number of elements: ", 17, element.getElementCount());
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.