mil.dod.th.ose.core.integration/src/mil/dod/th/ose/core/integration/TestCustomCommsService.java
public void testSetPhysicalLinkNameUUID() throws IllegalArgumentException, IOException, InterruptedException, 
        CCommException, IllegalStateException, FactoryException, PersistenceFailedException, PhysicalLinkException
    {
        CustomCommsService customCommsService = ServiceUtils.getService(m_Context, CustomCommsService.class);
        assertThat(customCommsService, is(notNullValue()));
        
        PhysicalLink link = customCommsService.createPhysicalLink(PhysicalLinkTypeEnum.I_2_C);
        
        //opening the link to see if we can still change the name
        link.open();
        
        EventHandlerSyncer syncer = 
                new EventHandlerSyncer(m_Context, FactoryDescriptor.TOPIC_FACTORY_OBJ_NAME_UPDATED, 
                     "(obj.name=testOpenSetName)");
        
        //name setting
        customCommsService.setPhysicalLinkName(link.getUuid(), "testOpenSetName");
        
        //wait for expected event
        syncer.waitForEvent(5);
        
        assertThat(link.getName(), is("testOpenSetName"));
        
        link.close();
    }
/**
     * Test setting the physical link layer's name using the UUID.
     */
Test setting the physical link layer's name using the UUID.
Test setting the physical link layer ' s name using the UUID .
public void testSetPhysicalLinkNameUUID() throws IllegalArgumentException, IOException, InterruptedException, 
        CCommException, IllegalStateException, FactoryException, PersistenceFailedException, PhysicalLinkException
    {
        CustomCommsService customCommsService = ServiceUtils.getService(m_Context, CustomCommsService.class);
        assertThat(customCommsService, is(notNullValue()));
        PhysicalLink link = customCommsService.createPhysicalLink(PhysicalLinkTypeEnum.I_2_C);
        link.open();
        EventHandlerSyncer syncer = 
                new EventHandlerSyncer(m_Context, FactoryDescriptor.TOPIC_FACTORY_OBJ_NAME_UPDATED, 
                     "(obj.name=testOpenSetName)");
        customCommsService.setPhysicalLinkName(link.getUuid(), "testOpenSetName");
        syncer.waitForEvent(5);
        assertThat(link.getName(), is("testOpenSetName"));
        link.close();
    }
public void testSetPhysicalLinkNameUUID ( ) throws IllegalArgumentException , IOException , InterruptedException , CCommException , IllegalStateException , FactoryException , PersistenceFailedException , PhysicalLinkException { CustomCommsService customCommsService = ServiceUtils . getService ( m_Context , CustomCommsService . class ) ; assertThat ( customCommsService , is ( notNullValue ( ) ) ) ; PhysicalLink link = customCommsService . createPhysicalLink ( PhysicalLinkTypeEnum . I_2_C ) ; link . open ( ) ; EventHandlerSyncer syncer = new EventHandlerSyncer ( m_Context , FactoryDescriptor . TOPIC_FACTORY_OBJ_NAME_UPDATED , "(obj.name=testOpenSetName)" ) ; customCommsService . setPhysicalLinkName ( link . getUuid ( ) , "testOpenSetName" ) ; syncer . waitForEvent ( 5 ) ; assertThat ( link . getName ( ) , is ( "testOpenSetName" ) ) ; link . close ( ) ; }
Test setting the physical link layer's name using the UUID.
Test setting the physical link layer ' s name using the UUID .
//opening the link to see if we can still change the name //name setting //wait for expected event