package org.codehaus.castor; import org.apache.maven.plugin.MojoExecutionException; import junit.framework.Test; import junit.framework.TestResult; import junit.textui.TestRunner; /** * Uses a simple TextRunner to run the xmlctf tests * * @goal text */ public class TextTestSuiteMojo extends AbstractTestSuiteMojo{ @Override public void runJUnit(Test testSuite) throws MojoExecutionException{ TestResult result = TestRunner.run(testSuite); if (result.errorCount() > 0 || result.failureCount() > 0) { throw new MojoExecutionException("Errors or Failures occured testing the MasterTestSuite!"); } } }