mil.dod.th.ose.core/test/mil/dod/th/ose/core/factory/impl/TestFactoryDescriptorImpl.java
@Test
    public void testGetFactoryObjectAttributesNull()
    {
        MetaTypeInformation metaInfo = mock(MetaTypeInformation.class);
        ObjectClassDefinition ocd = mock(ObjectClassDefinition.class);
        
        when(m_MetaTypeService.getMetaTypeInformation(m_MetaTypeProviderBundle.getBundle())).thenReturn(metaInfo);
        when(metaInfo.getObjectClassDefinition(anyString(), anyString())).thenReturn(ocd);
        
        AttributeDefinition[] ans = m_SUT.getAttributeDefinitions(ObjectClassDefinition.ALL);
        
        assertThat(ans.length, is(0));
    }
/**
     * Verify empty list is returned if null returned for attribute definitions.
     */
Verify empty list is returned if null returned for attribute definitions.
Verify empty list is returned if null returned for attribute definitions .
@Test
    public void testGetFactoryObjectAttributesNull()
    {
        MetaTypeInformation metaInfo = mock(MetaTypeInformation.class);
        ObjectClassDefinition ocd = mock(ObjectClassDefinition.class);
        when(m_MetaTypeService.getMetaTypeInformation(m_MetaTypeProviderBundle.getBundle())).thenReturn(metaInfo);
        when(metaInfo.getObjectClassDefinition(anyString(), anyString())).thenReturn(ocd);
        AttributeDefinition[] ans = m_SUT.getAttributeDefinitions(ObjectClassDefinition.ALL);
        assertThat(ans.length, is(0));
    }
@ Test public void testGetFactoryObjectAttributesNull ( ) { MetaTypeInformation metaInfo = mock ( MetaTypeInformation . class ) ; ObjectClassDefinition ocd = mock ( ObjectClassDefinition . class ) ; when ( m_MetaTypeService . getMetaTypeInformation ( m_MetaTypeProviderBundle . getBundle ( ) ) ) . thenReturn ( metaInfo ) ; when ( metaInfo . getObjectClassDefinition ( anyString ( ) , anyString ( ) ) ) . thenReturn ( ocd ) ; AttributeDefinition [ ] ans = m_SUT . getAttributeDefinitions ( ObjectClassDefinition . ALL ) ; assertThat ( ans . length , is ( 0 ) ) ; }
Verify empty list is returned if null returned for attribute definitions.
Verify empty list is returned if null returned for attribute definitions .