saveAs( "CreateDataSetReferDataSource_out.xml" ); assertTrue( compareTextFile( "CreateDataSetReferDataSource_golden.xml", "CreateDataSetReferDataSource_out.xml" ) );
save( ); assertTrue( compareTextFile( "CreateDataSetReferDataSource_golden.xml" ) );
	public void testCreateDataSetReferDataSource( ) throws Exception	{		openDesign( "CreateDataSetReferDataSource.xml" ); //$NON-NLS-1$		designHandle.includeLibrary( "Library_2.xml", "lib" ); //$NON-NLS-1$ //$NON-NLS-2$		DataSourceHandle parent = designHandle				.getLibrary( "lib" ).findDataSource( "Data Source" ); //$NON-NLS-1$ //$NON-NLS-2$		assertNotNull( parent );		ModelOdaAdapter adapter = new ModelOdaAdapter( );		OdaDataSourceHandle dataSource = (OdaDataSourceHandle) designHandle				.getElementFactory( ).newElementFrom( parent, "testSource" ); //$NON-NLS-1$ 		designHandle.getDataSources( ).add( dataSource );		assertEquals( designHandle, dataSource.getRoot( ) );		adapter.createDataSourceDesign( dataSource );		OdaDataSetHandle dataSet = designHandle				.getElementFactory( )				.newOdaDataSet(						"testDataSet", "org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet" ); //$NON-NLS-1$ //$NON-NLS-2$		dataSet.setDataSource( "testSource" ); //$NON-NLS-1$		designHandle.getDataSets( ).add( dataSet );		assertEquals( designHandle, dataSet.getRoot( ) );		DataSetDesign dataSetDesign = adapter.createDataSetDesign( dataSet );		dataSetDesign.setQueryText( "new query text" ); //$NON-NLS-1$		// update data set handle		adapter.updateDataSetHandle( dataSetDesign, dataSet, false );		saveAs( "CreateDataSetReferDataSource_out.xml" ); //$NON-NLS-1$		assertTrue( compareTextFile(				"CreateDataSetReferDataSource_golden.xml", "CreateDataSetReferDataSource_out.xml" ) ); //$NON-NLS-1$//$NON-NLS-2$	}