mil.dod.th.ose.config/test/mil/dod/th/ose/config/loading/impl/TestCustomCommsTrackerCustomizer.java
@Test
    public void testAddingPhysicalLinkMissing() throws IllegalArgumentException, CCommException, IllegalStateException,
            FactoryException, IOException
    {
        FactoryObjectConfig objectConfig = new FactoryObjectConfig()
            .withFactoryType(FactoryTypeEnum.PHYSICAL_LINK)
            .withProperties(m_StringMapList)
            .withPhysicalLinkType(PhysicalLinkTypeEnum.GPIO)
            .withCreatePolicy(CreatePolicyEnum.FIRST_RUN)
            .withName(PL_TEST_NAME);

        CustomCommsTrackerCustomizer sut = new CustomCommsTrackerCustomizer(objectConfig, m_CustomCommsService, m_Log,
            m_EventAdmin);

        sut.addingService(m_ServiceReference);

        verify(m_CustomCommsService, times(1)).
            tryCreatePhysicalLink(PhysicalLinkTypeEnum.GPIO, PL_TEST_NAME, m_Properties);
    }
/**
     * Test adding a PhysicalLink that isn't created yet.
     */
Test adding a PhysicalLink that isn't created yet.
Test adding a PhysicalLink that isn ' t created yet .
@Test
    public void testAddingPhysicalLinkMissing() throws IllegalArgumentException, CCommException, IllegalStateException,
            FactoryException, IOException
    {
        FactoryObjectConfig objectConfig = new FactoryObjectConfig()
            .withFactoryType(FactoryTypeEnum.PHYSICAL_LINK)
            .withProperties(m_StringMapList)
            .withPhysicalLinkType(PhysicalLinkTypeEnum.GPIO)
            .withCreatePolicy(CreatePolicyEnum.FIRST_RUN)
            .withName(PL_TEST_NAME);
        CustomCommsTrackerCustomizer sut = new CustomCommsTrackerCustomizer(objectConfig, m_CustomCommsService, m_Log,
            m_EventAdmin);
        sut.addingService(m_ServiceReference);
        verify(m_CustomCommsService, times(1)).
            tryCreatePhysicalLink(PhysicalLinkTypeEnum.GPIO, PL_TEST_NAME, m_Properties);
    }
@ Test public void testAddingPhysicalLinkMissing ( ) throws IllegalArgumentException , CCommException , IllegalStateException , FactoryException , IOException { FactoryObjectConfig objectConfig = new FactoryObjectConfig ( ) . withFactoryType ( FactoryTypeEnum . PHYSICAL_LINK ) . withProperties ( m_StringMapList ) . withPhysicalLinkType ( PhysicalLinkTypeEnum . GPIO ) . withCreatePolicy ( CreatePolicyEnum . FIRST_RUN ) . withName ( PL_TEST_NAME ) ; CustomCommsTrackerCustomizer sut = new CustomCommsTrackerCustomizer ( objectConfig , m_CustomCommsService , m_Log , m_EventAdmin ) ; sut . addingService ( m_ServiceReference ) ; verify ( m_CustomCommsService , times ( 1 ) ) . tryCreatePhysicalLink ( PhysicalLinkTypeEnum . GPIO , PL_TEST_NAME , m_Properties ) ; }
Test adding a PhysicalLink that isn't created yet.
Test adding a PhysicalLink that isn ' t created yet .