/*******************************************************************************
 * Copyright (c) 2004 Actuate Corporation.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *  Actuate Corporation  - initial API and implementation
 *******************************************************************************/

package org.eclipse.birt.report.engine.parser;

import org.eclipse.birt.report.engine.ir.ActionDesign;
import org.eclipse.birt.report.engine.ir.ImageItemDesign;

/**
 * 
 * TODO To change the template for this generated type comment go to Window -
 * Preferences - Java - Code Style - Code Templates
 */
public class ImageItemDesignTest extends AbstractDesignTestCase
{

	public void setUp( ) throws Exception
	{
		loadDesign( "imageItem_test.xml" );
	}

	public void testImageBasic( )
	{
		ImageItemDesign image = (ImageItemDesign) report.getContent( 0 );

		assertEquals( "myImage", image.getName( ) );
		assertEquals( 10, image.getHeight( ).getValue( ).getMeasure( ),
				Double.MIN_VALUE );
		assertEquals( 12, image.getWidth( ).getValue( ).getMeasure( ),
				Double.MIN_VALUE );
		assertEquals( 1, image.getX( ).getValue( ).getMeasure( ),
				Double.MIN_VALUE );
		assertEquals( 2, image.getY( ).getValue( ).getMeasure( ),
				Double.MIN_VALUE );

		assertEquals(
				"C:\\Documents and Settings\\Administrator\\My Documents\\63.jpg",
				image.getImageUri( ) );

		assertEquals( ActionDesign.ACTION_HYPERLINK, image.getAction( )
				.getActionType( ) );
		assertEquals( "http://www.msn.com", image.getAction( ).getHyperlink( )
				.getDesignValue( ) );
		assertEquals( "This is a sample image of gif type!", image.getAltText( )
				.getValue( ) );
	}

}

@@ -627,16 +627,69 @@
 Design;%0A
+import org.eclipse.birt.report.engine.ir.Expression;%0A
 import o
@@ -1550,16 +1550,42 @@
 ls(%0A%09%09%09%09
+Expression.newExpression( 
 %22C:%5C%5CDoc
@@ -1641,16 +1641,17 @@
 %5C63.jpg%22
+)
 ,%0A%09%09%09%09im

Fix Bugzilla  Bug 276795 Failures and errors occurs in junit test of org.eclipse.birt.report.engine.tests in 2.5.0 daily build v20090519-0630