FileDocCategorySizeDatePackage
XMLFormatterWithCDATAOnSystemOut.javaAPI DocApache Ant 1.702662Wed Dec 13 06:16:22 GMT 2006org.apache.tools.ant.taskdefs.optional.junit

XMLFormatterWithCDATAOnSystemOut

public class XMLFormatterWithCDATAOnSystemOut extends org.apache.tools.ant.BuildFileTest

Fields Summary
private static String
DIR
private static String
REPORT
private static String
TESTDATA
Constructors Summary
public XMLFormatterWithCDATAOnSystemOut(String name)


       
        super(name);
    
Methods Summary
public voidtestBuildfile()

        configureProject(DIR + "/cdataoutput.xml");
        if (getProject().getProperty("cdata.inner") == null) {
            // avoid endless loop
            executeTarget("run-junit");
            File f = getProject().resolveFile(REPORT);
            FileReader reader = null;
            try {
                reader = new FileReader(f);
                String content = FileUtils.readFully(reader);
                assertTrue(content.indexOf("</RESPONSE>]]>"
                                           + "</ERROR>") > 0);
            } finally {
                if (reader != null) {
                    reader.close();
                }
                f.delete();
            }
        }
    
public voidtestOutput()

        System.out.println(TESTDATA);