Bug 186940 Style name in theme cannot be identify by auto when reopen the library[01]
Description: Style name in theme cannot be identify by auto when reopen the library[01] Step: 1.Open a library and add a theme 2.New a style on the theme and use the default name that is "NewStyle" 3.Save the library, close it and reopen it again. 4.New another style on the same theme Actual result: The default style name on second times is also "NewStyle" Exception result: The default style name on second times is "NewStyle1"
model/org.eclipse.birt.report.model.tests/test/org/eclipse/birt/report/model/api/ElementFactoryTest.java
assertFalse( designHandle.needsSave( ) );
		ElementFactory factory = new ElementFactory( design );
		TableHandle tableHandle1 = factory.newTableItem( "Table1", 2 ); 
		designHandle.getBody( ).add( tableHandle1 );
		TableHandle tableHandle2 = factory.newTableItem( "Table1", 2 ); 
		assertEquals( "Table11", tableHandle2.getName( ) ); 
		TableHandle tableHandle3 = factory.newTableItem( null );
		assertNull( tableHandle3.getName( ) );
		DimensionHandle dimension = factory
				.newTabularDimension( "a/b\\c.d:1!2;3,f" ); 
		assertEquals( "a_b_c_d_1_2_3_f", dimension.getName( ) ); 
	}
	/**
	 * New extended item from library.
	 * 
	 * @throws Exception
	 */
	public void testNewExtendedItemFrom( ) throws Exception
	{
		openDesign( "ElementFactoryTest_2.xml" );
		LibraryHandle libraryHandle = designHandle
				.getLibrary( "ElementFactoryLibTest" );
		ExtendedItemHandle extendedItem = (ExtendedItemHandle) libraryHandle
				.getElementByID( 77 );
		DesignElementHandle handle = designHandle.getElementFactory( )
				.newElementFrom( extendedItem, "NewMatrix" );
		assertNotNull( handle );
		assertEquals( "NewMatrix", handle.getName( ) );
	}
}