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

import java.util.ArrayList;

import org.eclipse.birt.report.tests.engine.EngineCase;

/**
 * <b>Bug description</b>
 * <p>
 * Java based scripting -> rowInstance.getRowData( ) return null in onRender.
 * <p>
 * <b>Test description:</b>
 * <p>
 * This test makes sure that rowInstance.getParent( ).getRowData( ) can return
 * column data.
 */

public class Regression_123870 extends EngineCase
{

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

	public void test_Regression_123870( ) throws Exception
	{
		ArrayList errors = runAndRender_HTML( INPUT, OUTPUT );
		assertTrue( errors.size( ) <= 0 );
		Object obj = super.engineTask.getAppContext( ).get( "name" );
		assertNotNull( obj );
		assertEquals( "OFFICECODE", obj.toString( ) );
		obj = super.engineTask.getAppContext( ).get( "value" );
		assertNotNull( obj );
		assertEquals( "1", obj.toString( ) );
	}
}