Author: mostarda
Date: Sat Feb 4 18:02:13 2012
New Revision: 1240569
URL: http://svn.apache.org/viewvc?rev=1240569&view=rev
Log:
Added method to assert that no issues have been raised during extraction.
Modified:
incubator/any23/trunk/core/src/test/java/org/apache/any23/extractor/html/AbstractExtractorTestCase.java
Modified:
incubator/any23/trunk/core/src/test/java/org/apache/any23/extractor/html/AbstractExtractorTestCase.java
URL:
http://svn.apache.org/viewvc/incubator/any23/trunk/core/src/test/java/org/apache/any23/extractor/html/AbstractExtractorTestCase.java?rev=1240569&r1=1240568&r2=1240569&view=diff
==============================================================================
---
incubator/any23/trunk/core/src/test/java/org/apache/any23/extractor/html/AbstractExtractorTestCase.java
(original)
+++
incubator/any23/trunk/core/src/test/java/org/apache/any23/extractor/html/AbstractExtractorTestCase.java
Sat Feb 4 18:02:13 2012
@@ -283,6 +283,17 @@ public abstract class AbstractExtractorT
}
/**
+ * Asserts that the extraction generated no errors.
+ */
+ protected void assertNoIssues() {
+ for( Map.Entry<String, Collection<ErrorReporter.Error>> entry :
report.getExtractorToErrors().entrySet() ) {
+ if(entry.getValue().size() > 0) {
+ Assert.fail("Unexpected issue for extractor " + entry.getKey()
+ " : " + entry.getValue());
+ }
+ }
+ }
+
+ /**
* Asserts that an error has been produced by the processed {@link
org.apache.any23.extractor.Extractor}.
*
* @param level expected error level