public abstract class ContentExtractorTestBase extends ProcessorTestBase
Modifier and Type | Field and Description |
---|---|
protected Extractor |
extractor
An extractor created during the setUp.
|
Constructor and Description |
---|
ContentExtractorTestBase() |
Modifier and Type | Method and Description |
---|---|
protected static void |
assertNoSideEffects(CrawlURI uri)
Asserts that the given URI has no URI errors, no localized errors, and
no annotations.
|
static Recorder |
createRecorder(String content)
Deprecated.
|
static Recorder |
createRecorder(String content,
String charset) |
protected CrawlURI |
defaultURI()
Returns a CrawlURI for testing purposes.
|
protected abstract Extractor |
makeExtractor()
Subclasses should return an Extractor instance to test.
|
protected Object |
makeModule()
Return an example instance of the module.
|
void |
setUp()
Sets up the
extractor . |
void |
testFinished()
Tests that a URI whose linkExtractionFinished flag has been set has
no links extracted.
|
void |
testZeroContent()
Tests that a URI with a zero content length has no links extracted.
|
getModuleClass, getRecorder, getResourceDir, getSourceCodeDir, makeCrawlURI, runTest, testSerializationIfAppropriate, verifySerialization
countTestCases, createResult, getName, run, run, runBare, setName, tearDown, toString
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
protected Extractor extractor
public final void setUp()
extractor
.setUp
in class junit.framework.TestCase
protected Object makeModule()
ModuleTestBase
makeModule
in class ModuleTestBase
protected abstract Extractor makeExtractor()
protected CrawlURI defaultURI() throws Exception
Exception
- just in casepublic void testZeroContent() throws Exception
Exception
- just in casepublic void testFinished() throws Exception
Exception
- just in caseprotected static void assertNoSideEffects(CrawlURI uri)
uri
- the URI to test@Deprecated public static Recorder createRecorder(String content) throws IOException
IOException
public static Recorder createRecorder(String content, String charset) throws IOException
IOException
Copyright © 2003–2019 Internet Archive. All rights reserved.