public abstract class AbstractSinkTestCase
extends org.codehaus.plexus.PlexusTestCase
Constructor and Description |
---|
AbstractSinkTestCase() |
Modifier and Type | Method and Description |
---|---|
protected abstract Parser |
createParser()
Return a Parser for testing.
|
protected abstract Sink |
createSink()
Return a Sink for testing.
|
File |
getBasedirFile()
Return the current base diretory as a File.
|
protected Reader |
getTestReader()
Returns a Reader that gives access to a common test apt file.
|
protected Writer |
getTestWriter()
Returns a Writer to write a test output result.
|
protected abstract String |
outputExtension()
Return the default extension of files created by the test Sink.
|
void |
testApt()
Parses the test apt document (obtained via
getTestReader() ) with the Parser returned
by createParser() into the Sink returned by createSink() . |
customizeContext, getBasedir, getClassLoader, getConfiguration, getConfiguration, getConfigurationName, getContainer, getCustomConfigurationName, getResourceAsStream, getTestConfiguration, getTestConfiguration, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, lookup, lookup, release, setUp, tearDown
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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, format
public void testApt() throws Exception
getTestReader()
) with the Parser returned
by createParser()
into the Sink returned by createSink()
.Exception
- if anything goes wrong.protected abstract String outputExtension()
createSink()
protected abstract Parser createParser()
protected abstract Sink createSink() throws Exception
Exception
- if the Sink cannot be constructed.protected Writer getTestWriter() throws Exception
"target/output/test. + extension"
, where extension is returned by
outputExtension()
, in the current base directory.Exception
- if the Writer cannot be constructed.protected Reader getTestReader() throws Exception
Exception
- if the Reader cannot be constructed.public File getBasedirFile()
Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.