ArrayList messages = new ArrayList();
SimpleParameterProvider parameterProvider = new SimpleParameterProvider();
parameterProvider.setParameter( "solution", "test" ); //$NON-NLS-1$ //$NON-NLS-2$
parameterProvider.setParameter( "path", "reporting" ); //$NON-NLS-1$ //$NON-NLS-2$
parameterProvider.setParameter( "action", "JFree_XQuery_Chart_report.xaction" ); //$NON-NLS-1$ //$NON-NLS-2$
ActionComponent component =
new ActionComponent(
"samples/reporting/JFree_XQuery_Chart_report.xaction", null, IOutputHandler.OUTPUT_TYPE_DEFAULT, urlFactory, messages ); //$NON-NLS-1$
component.setParameterProvider( IParameterProvider.SCOPE_REQUEST, parameterProvider );
StandaloneSession session =
new StandaloneSession( Messages.getInstance().getString( "BaseTest.DEBUG_JUNIT_SESSION" ) ); //$NON-NLS-1$
component.validate( session, null );
OutputStream outputStream = getOutputStream( "ReportingTest.testJFreeReportWithChartActionComponent", ".html" ); //$NON-NLS-1$ //$NON-NLS-2$
String content = component.getContent( "text/html" ); //$NON-NLS-1$
try {
outputStream.write( content.getBytes() );
} catch ( Exception e ) {
//ignore
}