mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/ccomm/physical/TestPhysicalLinkServiceProxy.java
@Test
    public void testGetAdditionalServiceRegProps()
    {
        //mock factory descriptor
        FactoryInternal desc = mock(FactoryInternal.class);
        PhysicalLinkCapabilities caps = mock(PhysicalLinkCapabilities.class);
        when(desc.getPhysicalLinkCapabilities()).thenReturn(caps);
        when(caps.getLinkType()).thenReturn(PhysicalLinkTypeEnum.SERIAL_PORT);

        Dictionary<String, Object> props = new Hashtable<>();
        props.put(FactoryDescriptor.FACTORY_TYPE_SERVICE_PROPERTY, PhysicalLinkFactory.class);
        props.put(PhysicalLink.LINK_TYPE_SERVICE_PROPERTY, PhysicalLinkTypeEnum.SERIAL_PORT.value());
        assertThat(m_SUT.getAdditionalFactoryRegistrationProps(desc).equals(props), is(true));
    }
/**
     * Verify dictionary with factory type is returned for additional registration properties.
     */
Verify dictionary with factory type is returned for additional registration properties.
Verify dictionary with factory type is returned for additional registration properties .
@Test
    public void testGetAdditionalServiceRegProps()
    {
        FactoryInternal desc = mock(FactoryInternal.class);
        PhysicalLinkCapabilities caps = mock(PhysicalLinkCapabilities.class);
        when(desc.getPhysicalLinkCapabilities()).thenReturn(caps);
        when(caps.getLinkType()).thenReturn(PhysicalLinkTypeEnum.SERIAL_PORT);
        Dictionary<String, Object> props = new Hashtable<>();
        props.put(FactoryDescriptor.FACTORY_TYPE_SERVICE_PROPERTY, PhysicalLinkFactory.class);
        props.put(PhysicalLink.LINK_TYPE_SERVICE_PROPERTY, PhysicalLinkTypeEnum.SERIAL_PORT.value());
        assertThat(m_SUT.getAdditionalFactoryRegistrationProps(desc).equals(props), is(true));
    }
@ Test public void testGetAdditionalServiceRegProps ( ) { FactoryInternal desc = mock ( FactoryInternal . class ) ; PhysicalLinkCapabilities caps = mock ( PhysicalLinkCapabilities . class ) ; when ( desc . getPhysicalLinkCapabilities ( ) ) . thenReturn ( caps ) ; when ( caps . getLinkType ( ) ) . thenReturn ( PhysicalLinkTypeEnum . SERIAL_PORT ) ; Dictionary < String , Object > props = new Hashtable < > ( ) ; props . put ( FactoryDescriptor . FACTORY_TYPE_SERVICE_PROPERTY , PhysicalLinkFactory . class ) ; props . put ( PhysicalLink . LINK_TYPE_SERVICE_PROPERTY , PhysicalLinkTypeEnum . SERIAL_PORT . value ( ) ) ; assertThat ( m_SUT . getAdditionalFactoryRegistrationProps ( desc ) . equals ( props ) , is ( true ) ) ; }
Verify dictionary with factory type is returned for additional registration properties.
Verify dictionary with factory type is returned for additional registration properties .
//mock factory descriptor