Added comments and removed unused import

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@775374 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Josh Micich 2009-05-15 22:44:56 +00:00
parent b92b2d556b
commit 7b8b6d7d2c

View File

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