import junit.framework.Assert;\r
import junit.framework.AssertionFailedError;\r
\r
-import org.apache.poi.ss.formula.FormulaParser;\r
import org.apache.poi.ss.formula.FormulaParser.FormulaParseException;\r
/**\r
* Avoids making {@link FormulaParseException} public\r
* @author Josh Micich\r
*/\r
public class FormulaParserTestHelper {\r
+ /**\r
+ * @throws AssertionFailedError if <tt>e</tt> is not a formula parser exception \r
+ * or if the exception message doesn't match.\r
+ */\r
public static void confirmParseException(RuntimeException e, String expectedMessage) {\r
checkType(e);\r
Assert.assertEquals(expectedMessage, e.getMessage());\r
}\r
+ /**\r
+ * @throws AssertionFailedError if <tt>e</tt> is not a formula parser exception \r
+ * or if <tt>e</tt> has no message.\r
+ */\r
public static void confirmParseException(RuntimeException e) {\r
checkType(e);\r
Assert.assertNotNull(e.getMessage());\r