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

import java.util.Collection;

import org.eclipse.birt.report.engine.api.IGetParameterDefinitionTask;
import org.eclipse.birt.report.engine.api.IReportRunnable;
import org.eclipse.birt.report.tests.engine.EngineCase;

/**
 * <b>Bug description</b>
 * <p>
 * NPE preview report with cascading parameter groups but without related
 * dataset
 * 
 * <p>
 * <b>Test description</b>
 * <p>
 * This test makes sure that No Exception will throw out.
 */

public class Regression_114721 extends EngineCase
{

	private final static String INPUT = "regression_114721.rptdesign";// "regression_114721.rptdesign";
	// //$NON-NLS-1$
	private final static String OUTPUT = "regression_114721.html"; //$NON-NLS-1$
	private String in_path = this.getClassFolder( )
			+ System.getProperty( "file.separator" ) + "input"
			+ System.getProperty( "file.separator" );

	/**
	 * @throws Exception
	 * @throws Exception
	 */

	public void test_Regression_114721( ) throws Exception
	{
		IReportRunnable runnable = engine.openReportDesign( in_path + INPUT );
		IGetParameterDefinitionTask paramTask = engine
				.createGetParameterDefinitionTask( runnable );
		Collection list = paramTask.getSelectionListForCascadingGroup(
				"CascadingGroup", new Object[0] );
		assertNotNull( "Return null list!", list );
		assertEquals( "Return none empty list!", 0, list.size( ) );
	}
}
