Bug 183918 get relative file path of linkage library
model/org.eclipse.birt.report.model.tests/test/org/eclipse/birt/report/model/library/DesignLoadLibraryTest.java
import org.eclipse.birt.report.model.elements.interfaces.IReportItemModel;
import org.eclipse.birt.report.model.metadata.ColorPropertyType;
import org.eclipse.birt.report.model.parser.DesignParserException;
import org.eclipse.birt.report.model.util.BaseTestCase;
/**
 * Tests whether report design can handle the cases of loading libraires.
 */
public class DesignLoadLibraryTest extends BaseTestCase
{
	/**
	 * Tests one report design including an inexistent library.
	 * 
	 * And test status of elements that extends library elements.
	 * 
	 * @throws Exception
	 *             if any exception
	 */
	public void testLoadDesignWithInexistentLibrary( ) throws Exception
	{
		openDesign( "DesignWithInexistentLibrary.xml" ); 
		List libraries = designHandle.getAllLibraries( );
		assertEquals( 1, libraries.size( ) );
		LibraryHandle libHandle = (LibraryHandle) libraries.get( 0 );
		assertFalse( libHandle.isValid( ) );
		assertEquals( DesignParserException.DESIGN_EXCEPTION_FILE_NOT_FOUND,
				( (ErrorDetail) libHandle.getErrorList( ).get( 0 ) )
						.getErrorCode( ) );
		ReportElementHandle element = (ReportElementHandle) designHandle
				.findElement( "myText" ); 
		assertTrue( element.isValidLayoutForCompoundElement( ) );