org.apache.maven.doxia.parser
Class AbstractParserTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.codehaus.plexus.PlexusTestCase
              extended by org.apache.maven.doxia.parser.AbstractParserTestCase
All Implemented Interfaces:
junit.framework.Test

public abstract class AbstractParserTestCase
extends org.codehaus.plexus.PlexusTestCase

Test the parsing of sample input files

Since:
1.0
Version:
$Id: AbstractParserTestCase.java 747735 2009-02-25 10:43:09Z ltheussl $
Author:
Carlos Sanchez, Emmanuel Venisse

Field Summary
 
Fields inherited from class org.codehaus.plexus.PlexusTestCase
container, context
 
Constructor Summary
AbstractParserTestCase()
           
 
Method Summary
protected abstract  String getDocument()
          Path of the model to test, relative to basedir
protected abstract  Parser getParser()
          Parser to use to convert input to sink events
protected  Sink getSink()
          Sink to write the output of the parsing
 void testParser()
          Parse the model in the path specified by getDocument(), with parser from getParser(), and output to sink from getSink()
 
Methods inherited from class org.codehaus.plexus.PlexusTestCase
customizeContext, getBasedir, getClassLoader, getConfiguration, getConfiguration, getConfigurationName, getContainer, getCustomConfigurationName, getResourceAsStream, getTestConfiguration, getTestConfiguration, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, lookup, lookup, release, setUp, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractParserTestCase

public AbstractParserTestCase()
Method Detail

getParser

protected abstract Parser getParser()
Parser to use to convert input to sink events

Returns:
the parser to use

getDocument

protected abstract String getDocument()
Path of the model to test, relative to basedir

Returns:
the relative path

getSink

protected Sink getSink()
Sink to write the output of the parsing

Returns:
a SinkAdapter if not overridden

testParser

public void testParser()
                throws Exception
Parse the model in the path specified by getDocument(), with parser from getParser(), and output to sink from getSink()

Throws:
Exception - if any.


Copyright © 2005-2009 The Apache Software Foundation. All Rights Reserved.