slot.setDisplayNameID( "Data Sets" ); slot.setName( "dataSets" ); slot.setMultipleCardinality( true ); slot.addType( ReportDesignConstants.DATA_SOURCE_ELEMENT ); label.addSlot( slot );
MetadataTestUtil.setDisplayNameKey( slot, "Data Sets" ); MetadataTestUtil.setName( slot, "dataSets" ); MetadataTestUtil.setMultipleCardinality( slot, true ); MetadataTestUtil.addType( slot, ReportDesignConstants.DATA_SOURCE_ELEMENT ); MetadataTestUtil.addSlot( label, slot );
	public void testAddSlotToElement( )	{		// Get an element from dictionary		ElementDefn label = (ElementDefn) MetaDataDictionary.getInstance( )				.getElement( ReportDesignConstants.LABEL_ITEM );		assertEquals( 0, label.getSlotCount( ) );		// Add one slot		SlotDefn slot = new SlotDefn( );		slot.setDisplayNameID( "Data Sets" ); //$NON-NLS-1$		slot.setName( "dataSets" ); //$NON-NLS-1$		slot.setMultipleCardinality( true );		slot.addType( ReportDesignConstants.DATA_SOURCE_ELEMENT );		label.addSlot( slot );		assertEquals( 1, label.getSlotCount( ) );		// Add another slot		label.addSlot( slot );		assertEquals( 2, label.getSlotCount( ) );	}