
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 -> ReportElementInstance.getNamedExpressionValue does
 * not work properly.
 * <p>
 * <b>Test description:</b>
 * <p>
 * This test makes sure that ReportElementInstance.getNamedExpressionValue
 * returns correct value.
 */

public class Regression_136273 extends EngineCase
{

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

	public void test_Regression_136273( ) throws Exception
	{
		ArrayList errors = runAndRender_HTML( INPUT, OUTPUT );
		assertTrue( errors.size( ) <= 0 );
		Object obj = super.engineTask.getAppContext( ).get( "fontSize" );
		assertNotNull( obj );
		assertEquals( "larger", obj.toString( ) );
		obj = super.engineTask.getAppContext( ).get( "color" );
		assertNotNull( obj );
		assertEquals( "olive", obj.toString( ) );
		obj = super.engineTask.getAppContext( ).get( "fontWeight" );
		assertNotNull( obj );
		assertEquals( "bolder", obj.toString( ) );
	}
}