def.setName( "TestElement2" ); def.setHasStyle( true ); def.addStyleProperty( Style.FONT_SIZE_PROP ); def.addStyleProperty( Style.DATE_TIME_FORMAT_PROP ); def.setNameOption( MetaDataConstants.NO_NAME ); def.setAbstract( true ); def.build( );
MetadataTestUtil.setName( def, "TestElement2" ); MetadataTestUtil.setHasStyle( def, true ); MetadataTestUtil.addStyleProp( def, Style.FONT_SIZE_PROP ); MetadataTestUtil.addStyleProp( def, Style.DATE_TIME_FORMAT_PROP ); MetadataTestUtil.setNameOption( def, MetaDataConstants.NO_NAME ); MetadataTestUtil.setAbstract( def, true ); MetadataTestUtil.build( def );
	public void testBuild( ) throws MetaDataException	{		// element without parent and style		def = new ElementDefn( );		def.setName( "TestElement1" ); //$NON-NLS-1$		def.setAbstract( true );		def.setHasStyle( false );		def.setNameOption( MetaDataConstants.NO_NAME );		def.build( );		// element without parent but with style		def = new ElementDefn( );		def.setName( "TestElement2" ); //$NON-NLS-1$		def.setHasStyle( true );		def.addStyleProperty( Style.FONT_SIZE_PROP );		def.addStyleProperty( Style.DATE_TIME_FORMAT_PROP );		def.setNameOption( MetaDataConstants.NO_NAME );		def.setAbstract( true );		def.build( );		// element with parent and style		def = new ElementDefn( );		def.setAbstract( true );		def.setName( "TestElement3" ); //$NON-NLS-1$		def.setExtends( "ReportElement" ); //$NON-NLS-1$		def.setHasStyle( true );		def.addStyleProperty( Style.FONT_SIZE_PROP );		def.addStyleProperty( Style.DATE_TIME_FORMAT_PROP );		def.setNameOption( MetaDataConstants.NO_NAME );		def.build( );	}