assertSame( design.findDataSet( "DataSet1" ), ( (ElementRefValue) dataSets.get( 0 ) ).getElement( ) ); assertSame( design.findDataSet( "DataSet2" ), ( (ElementRefValue) dataSets.get( 1 ) ).getElement( ) );
DataSetHandle ds1 = (DataSetHandle) designHandle .findDataSet( "DataSet1" ); assertSame( ds1.getElement( ), ( (ElementRefValue) dataSets.get( 0 ) ) .getElement( ) ); assertEquals( 30, ds1.getRowFetchLimit( ) );  DataSetHandle ds2 = (DataSetHandle) designHandle .findDataSet( "DataSet2" ); assertEquals( 0, ds2.getRowFetchLimit( ) ); assertSame( ds2.getElement( ), ( (ElementRefValue) dataSets.get( 1 ) ) .getElement( ) );
	public void testParser( ) throws DesignFileException	{		openDesign( inputFileName );		JointDataSetHandle dataSet = (JointDataSetHandle) designHandle				.findJointDataSet( "JointDataSet" ); //$NON-NLS-1$		assertNotNull( dataSet );		List dataSets = dataSet.getListProperty( JointDataSet.DATA_SETS_PROP );		assertEquals( 2, dataSets.size( ) );		assertSame( design.findDataSet( "DataSet1" ), //$NON-NLS-1$				( (ElementRefValue) dataSets.get( 0 ) ).getElement( ) );		assertSame( design.findDataSet( "DataSet2" ), //$NON-NLS-1$				( (ElementRefValue) dataSets.get( 1 ) ).getElement( ) );		Iterator joinConditionsIterator = dataSet.joinConditionsIterator( );		assertTrue( joinConditionsIterator.hasNext( ) );		JoinConditionHandle joinConditionHandle = (JoinConditionHandle) joinConditionsIterator				.next( );		assertFalse( joinConditionsIterator.hasNext( ) );		assertEquals( DesignChoiceConstants.JOIN_TYPE_INNER,				joinConditionHandle.getJoinType( ) );		assertEquals( DesignChoiceConstants.JOIN_OPERATOR_EQALS,				joinConditionHandle.getOperator( ) );		assertEquals( "DataSet1", joinConditionHandle.getLeftDataSet( ) ); //$NON-NLS-1$		assertEquals( "DataSet2", joinConditionHandle.getRightDataSet( ) ); //$NON-NLS-1$		assertEquals( "leftExpression", joinConditionHandle //$NON-NLS-1$				.getLeftExpression( ) );		assertEquals( "rightExpression", joinConditionHandle //$NON-NLS-1$				.getRightExpression( ) );		TableHandle table = (TableHandle) designHandle.findElement( "table1" ); //$NON-NLS-1$		assertEquals( "JointDataSet", table.getDataSet( ).getName( ) ); //$NON-NLS-1$		List parameters = (List) dataSet.getProperty( SimpleDataSet.PARAMETERS_PROP );		assertEquals( 1, parameters.size( ) );		// Test "input-parameters" on DataSet		DataSetParameter parameter = (DataSetParameter) parameters.get( 0 );		assertEquals( 1, parameter.getPosition( ).intValue( ) );		assertEquals( "name", parameter.getName( ) ); //$NON-NLS-1$		assertEquals( DesignChoiceConstants.COLUMN_DATA_TYPE_STRING, parameter				.getDataType( ) );		assertTrue( parameter.isOptional( ) );		assertEquals( "default value 1", parameter.getDefaultValue( ) ); //$NON-NLS-1$		assertEquals( true, parameter.allowNull( ) ); //$NON-NLS-1$		// Test "result-set" on DataSet		List columns = (List) dataSet.getProperty( DataSet.RESULT_SET_PROP );		assertEquals( 1, columns.size( ) );		ResultSetColumn column = (ResultSetColumn) columns.get( 0 );		assertEquals( 1, column.getPosition( ).intValue( ) );		assertEquals( "name", column.getColumnName( ) ); //$NON-NLS-1$		assertEquals( DesignChoiceConstants.COLUMN_DATA_TYPE_STRING, column				.getDataType( ) );		// Test "computed-columns" on DataSet		columns = (List) dataSet.getProperty( DataSet.COMPUTED_COLUMNS_PROP );		assertEquals( 1, columns.size( ) );		ComputedColumn computedColumn = (ComputedColumn) columns.get( 0 );		assertEquals( "column1", computedColumn.getColumnName( )); //$NON-NLS-1$		assertEquals( "expression1", computedColumn.getExpression( ) ); //$NON-NLS-1$		assertEquals( DesignChoiceConstants.COLUMN_DATA_TYPE_INTEGER, computedColumn.getDataType( ) );		// Test "column-hints" on DataSet		List columnHints = (List) dataSet				.getProperty( DataSet.COLUMN_HINTS_PROP );		assertEquals( 1, columnHints.size( ) );		ColumnHint columnHint = (ColumnHint) columnHints.get( 0 );		PropertyDefn member = (PropertyDefn) columnHint.getDefn( ).getMember(				ColumnHint.COLUMN_NAME_MEMBER );		assertEquals( "username", columnHint.getProperty( design, member ) ); //$NON-NLS-1$		member = (PropertyDefn) columnHint.getDefn( ).getMember(				ColumnHint.ALIAS_MEMBER );		assertEquals( "userid", columnHint.getProperty( design, member ) ); //$NON-NLS-1$		member = (PropertyDefn) columnHint.getDefn( ).getMember(				ColumnHint.SEARCHING_MEMBER );		assertEquals( DesignChoiceConstants.SEARCH_TYPE_NONE, columnHint				.getProperty( design, member ) ); //$NON-NLS-1$		member = (PropertyDefn) columnHint.getDefn( ).getMember(				ColumnHint.EXPORT_MEMBER );		assertEquals( DesignChoiceConstants.EXPORT_TYPE_ALWAYS, columnHint				.getProperty( design, member ) ); //$NON-NLS-1$		member = (PropertyDefn) columnHint.getDefn( ).getMember(				ColumnHint.ANALYSIS_MEMBER );		assertEquals( DesignChoiceConstants.ANALYSIS_TYPE_DIMENSION, columnHint				.getProperty( design, member ) ); //$NON-NLS-1$		member = (PropertyDefn) columnHint.getDefn( ).getMember(				ColumnHint.PARENT_LEVEL_MEMBER );		assertEquals( "4", columnHint.getProperty( design, member ) ); //$NON-NLS-1$		member = (PropertyDefn) columnHint.getDefn( ).getMember(				ColumnHint.FORMAT_MEMBER );		assertEquals( "##.###", columnHint.getProperty( design, member ) ); //$NON-NLS-1$		member = (PropertyDefn) columnHint.getDefn( ).getMember(				ColumnHint.DISPLAY_NAME_ID_MEMBER );		assertEquals(				"message.column-hint.username", columnHint.getProperty( design, member ) ); //$NON-NLS-1$		member = (PropertyDefn) columnHint.getDefn( ).getMember(				ColumnHint.DISPLAY_NAME_MEMBER );		assertEquals( "User Name", columnHint.getProperty( design, member ) ); //$NON-NLS-1$		member = (PropertyDefn) columnHint.getDefn( ).getMember(				ColumnHint.HELP_TEXT_ID_MEMBER );		assertEquals(				"message.column-hint.help", columnHint.getProperty( design, member ) ); //$NON-NLS-1$		member = (PropertyDefn) columnHint.getDefn( ).getMember(				ColumnHint.HELP_TEXT_MEMBER );		assertEquals( "Help me!", columnHint.getProperty( design, member ) ); //$NON-NLS-1$		// Test "filter" on DataSet		ArrayList filters = (ArrayList) dataSet				.getProperty( DataSet.FILTER_PROP );		assertEquals( 1, filters.size( ) );		assertEquals(				"lt", ( (FilterCondition) filters.get( 0 ) ).getOperator( ) ); //$NON-NLS-1$		assertEquals(				"filter expression", ( (FilterCondition) filters.get( 0 ) ).getExpr( ) ); //$NON-NLS-1$		assertEquals(				"value1 expression", ( (FilterCondition) filters.get( 0 ) ).getValue1( ) ); //$NON-NLS-1$		assertEquals(				"value2 expression", ( (FilterCondition) filters.get( 0 ) ).getValue2( ) ); //$NON-NLS-1$	}