mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/ccomm/physical/TestPhysicalLinkServiceProxy.java
@Test
    public void testGetExtendedServiceAttributeDefinitionsEmpty()
    {
        FactoryInternal fact = mock(FactoryInternal.class);
        PhysicalLinkCapabilities physCaps = mock(PhysicalLinkCapabilities.class);
        
        when(fact.getCapabilities()).thenReturn(physCaps);
        when(physCaps.getLinkType()).thenReturn(PhysicalLinkTypeEnum.SPI);
        
        AttributeDefinition[] retrieved = m_SUT.getExtendedServiceAttributeDefinitions(factoryServiceContext, fact,
                ObjectClassDefinition.ALL);
        
        assertThat(retrieved.length, is(0));
    }
/**
     * Verify no extra attributes if not GPIO or serial port.
     */
Verify no extra attributes if not GPIO or serial port.
Verify no extra attributes if not GPIO or serial port .
@Test
    public void testGetExtendedServiceAttributeDefinitionsEmpty()
    {
        FactoryInternal fact = mock(FactoryInternal.class);
        PhysicalLinkCapabilities physCaps = mock(PhysicalLinkCapabilities.class);
        when(fact.getCapabilities()).thenReturn(physCaps);
        when(physCaps.getLinkType()).thenReturn(PhysicalLinkTypeEnum.SPI);
        AttributeDefinition[] retrieved = m_SUT.getExtendedServiceAttributeDefinitions(factoryServiceContext, fact,
                ObjectClassDefinition.ALL);
        assertThat(retrieved.length, is(0));
    }
@ Test public void testGetExtendedServiceAttributeDefinitionsEmpty ( ) { FactoryInternal fact = mock ( FactoryInternal . class ) ; PhysicalLinkCapabilities physCaps = mock ( PhysicalLinkCapabilities . class ) ; when ( fact . getCapabilities ( ) ) . thenReturn ( physCaps ) ; when ( physCaps . getLinkType ( ) ) . thenReturn ( PhysicalLinkTypeEnum . SPI ) ; AttributeDefinition [ ] retrieved = m_SUT . getExtendedServiceAttributeDefinitions ( factoryServiceContext , fact , ObjectClassDefinition . ALL ) ; assertThat ( retrieved . length , is ( 0 ) ) ; }
Verify no extra attributes if not GPIO or serial port.
Verify no extra attributes if not GPIO or serial port .