/*******************************************************************************
* 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.model.parser;

import org.eclipse.birt.report.model.util.BaseTestCase;

/**
 * <table border="1" cellpadding="0" cellspacing="0" style="border-collapse:
 * collapse" bordercolor="#111111" width="100%" id="AutoNumber6">
 * 
 * <tr>
 * <td width="33%"><b>Method </b></td>
 * <td width="33%"><b>Test Case </b></td>
 * <td width="34%"><b>Expected Result </b></td>
 * </tr>
 * 
 * <tr>
 * <td width="33%">{@link #testParser()}</td>
 * <td width="33%">Test all properties</td>
 * <td width="34%">the correct value returned.</td>
 * </tr>
 * 
 * <tr>
 * <td width="33%">{@link #testWriter()}</td>
 * <td width="33%">Set new value to properties and save it.</td>
 * <td width="34%">new value should be save into the output file, and output
 * file is same as golden file.</td>
 * </tr>
 * </table>
 * 
 */

public class ExtendedItemParseTest extends BaseTestCase
{

	String fileName = "ExtendedItemParseTest.xml"; //$NON-NLS-1$
	String outFileName = "ExtendedItemParseTest_out.xml"; //$NON-NLS-1$
	String goldenFileName = "ExtendedItemParseTest_golden.xml"; //$NON-NLS-1$
	String checkFileName = "ExtendedItemParseTest_1.xml"; //$NON-NLS-1$

	/*
	 * @see BaseTestCase#setUp()
	 */
	protected void setUp( ) throws Exception
	{
		super.setUp( );
	}

	/**
	 * Test all properties.
	 * 
	 * @throws Exception
	 *             if opening design file failed.
	 */
	public void testParser( ) throws Exception
	{
//		openDesign( fileName );
//		ExtendedItemHandle extendedHandle = (ExtendedItemHandle) designHandle
//				.findElement( "right extended item" ); //$NON-NLS-1$
//		assertNotNull( extendedHandle );
//		assertEquals( "plug in", extendedHandle.getExtension( ) ); //$NON-NLS-1$

	}

	/**
	 * This test sets properties, writes the design file and compares it with
	 * golden file.
	 * 
	 * @throws Exception
	 *             if opening or saving design file failed.
	 */
	public void testWriter( ) throws Exception
	{
//		openDesign( fileName );
//
//		ExtendedItemHandle extendedHandle = (ExtendedItemHandle) designHandle
//				.findElement( "right extended item" ); //$NON-NLS-1$
//		assertNotNull( extendedHandle );
//		extendedHandle.setExtension( "new plug in" ); //$NON-NLS-1$
//		saveAs( outFileName );
//		assertTrue( compareTextFile( goldenFileName, outFileName ) );

	}	
}
