mil.dod.th.ose.core.integration/src/mil/dod/th/ose/core/integration/TestCustomCommsService.java
public void testExtendedAttributes() throws CCommException, PhysicalLinkException
    {
        CustomCommsService customCommsService = ServiceUtils.getService(m_Context, CustomCommsService.class);
        
        PhysicalLink serialPort = customCommsService.createPhysicalLink(PhysicalLinkTypeEnum.SERIAL_PORT);
        
        ImmutableMap<String, AttributeDefinition> attributeDefMap = 
                Maps.uniqueIndex(Arrays.asList(serialPort.getFactory().
                        getAttributeDefinitions(ObjectClassDefinition.ALL)), 
                        new Function<AttributeDefinition, String>()
                        {
                            @Override
                            public String apply(AttributeDefinition def)
                            {
                                return def.getID();
                            }
                        });

        // base props first
        assertThat(attributeDefMap.keySet(), hasItem(PhysicalLinkAttributes.CONFIG_PROP_DATA_BITS));
        // make sure extended properties are there
        assertThat(attributeDefMap.keySet(), hasItem(SerialPortAttributes.CONFIG_PROP_BAUD_RATE));
    }
/**
     * Verify attributes can be retrieved for links that have extended attributes.
     */
Verify attributes can be retrieved for links that have extended attributes.
Verify attributes can be retrieved for links that have extended attributes .
public void testExtendedAttributes() throws CCommException, PhysicalLinkException
    {
        CustomCommsService customCommsService = ServiceUtils.getService(m_Context, CustomCommsService.class);
        PhysicalLink serialPort = customCommsService.createPhysicalLink(PhysicalLinkTypeEnum.SERIAL_PORT);
        ImmutableMap<String, AttributeDefinition> attributeDefMap = 
                Maps.uniqueIndex(Arrays.asList(serialPort.getFactory().
                        getAttributeDefinitions(ObjectClassDefinition.ALL)), 
                        new Function<AttributeDefinition, String>()
                        {
                            @Override
                            public String apply(AttributeDefinition def)
                            {
                                return def.getID();
                            }
                        });
        assertThat(attributeDefMap.keySet(), hasItem(PhysicalLinkAttributes.CONFIG_PROP_DATA_BITS));
        assertThat(attributeDefMap.keySet(), hasItem(SerialPortAttributes.CONFIG_PROP_BAUD_RATE));
    }
public void testExtendedAttributes ( ) throws CCommException , PhysicalLinkException { CustomCommsService customCommsService = ServiceUtils . getService ( m_Context , CustomCommsService . class ) ; PhysicalLink serialPort = customCommsService . createPhysicalLink ( PhysicalLinkTypeEnum . SERIAL_PORT ) ; ImmutableMap < String , AttributeDefinition > attributeDefMap = Maps . uniqueIndex ( Arrays . asList ( serialPort . getFactory ( ) . getAttributeDefinitions ( ObjectClassDefinition . ALL ) ) , new Function < AttributeDefinition , String > ( ) { @ Override public String apply ( AttributeDefinition def ) { return def . getID ( ) ; } } ) ; assertThat ( attributeDefMap . keySet ( ) , hasItem ( PhysicalLinkAttributes . CONFIG_PROP_DATA_BITS ) ) ; assertThat ( attributeDefMap . keySet ( ) , hasItem ( SerialPortAttributes . CONFIG_PROP_BAUD_RATE ) ) ; }
Verify attributes can be retrieved for links that have extended attributes.
Verify attributes can be retrieved for links that have extended attributes .
// base props first // make sure extended properties are there