
package org.eclipse.birt.report.tests.engine.regression;

import org.eclipse.birt.report.engine.api.script.element.IAction;
import org.eclipse.birt.report.tests.engine.EngineCase;

/**
 * <b>Bug description</b>
 * <p>
 * Java based scripting, IDataItem.getAction() returned null in onPrepare event
 * <p>
 * <b>Test description:</b>
 * <p>
 * This test makes sure that IDataItem.getAction() returns valid object of type
 * IAction
 */

public class Regression_121354 extends EngineCase
{

	private final static String INPUT = "regression_121354.rptdesign";
	private final static String OUTPUT = "regression_121354.html";

	public void test_Regression_121354( ) throws Exception
	{
		runAndRender_HTML( INPUT, OUTPUT );

		Object obj = super.engineTask.getAppContext( ).get( "action" );
		if ( obj instanceof IAction )
			assertNotNull( (IAction) obj );
		else
			fail( "invalid object: " + obj );
	}
}