mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/mp/TestProgramImpl.java
@Test
    public void testGetFactoryObjectDeps()
    {
        //create a program with no dependencies
        ProgramImpl program = createProgram("test");
        //should not be null because they are initialized at construction of the program
        assertThat(program.getFactoryObjectDeps(Asset.class), is(notNullValue()));
        assertThat(program.getFactoryObjectDeps(PhysicalLink.class), is(notNullValue()));
        assertThat(program.getFactoryObjectDeps(LinkLayer.class), is(notNullValue()));
        assertThat(program.getFactoryObjectDeps(TransportLayer.class), is(notNullValue()));
        
        try
        {
            program.getFactoryObjectDeps(FactoryObject.class);
            fail("Expecting exception");
        }
        catch (IllegalArgumentException e)
        {
            
        }
        //verify that you cannot add to the list externally        
        try
        {
            program.getFactoryObjectDeps(PhysicalLink.class).add("link 1");
            fail("expecting exception");
        }
        catch (UnsupportedOperationException e)
        {
            
        }        
    }
/**
     * Test getting factory object dependencies.
     * 
     * Verify that the mission program manager is called to try to the reference of the dependecy based on the type.
     */
Test getting factory object dependencies.

Verify that the mission program manager is called to try to the reference of the dependecy based on the type.
Test getting factory object dependencies . Verify that the mission program manager is called to try to the reference of the dependecy based on the type .
@Test
    public void testGetFactoryObjectDeps()
    {
        ProgramImpl program = createProgram("test");
        assertThat(program.getFactoryObjectDeps(Asset.class), is(notNullValue()));
        assertThat(program.getFactoryObjectDeps(PhysicalLink.class), is(notNullValue()));
        assertThat(program.getFactoryObjectDeps(LinkLayer.class), is(notNullValue()));
        assertThat(program.getFactoryObjectDeps(TransportLayer.class), is(notNullValue()));
        try
        {
            program.getFactoryObjectDeps(FactoryObject.class);
            fail("Expecting exception");
        }
        catch (IllegalArgumentException e)
        {
        }
        try
        {
            program.getFactoryObjectDeps(PhysicalLink.class).add("link 1");
            fail("expecting exception");
        }
        catch (UnsupportedOperationException e)
        {
        }        
    }
@ Test public void testGetFactoryObjectDeps ( ) { ProgramImpl program = createProgram ( "test" ) ; assertThat ( program . getFactoryObjectDeps ( Asset . class ) , is ( notNullValue ( ) ) ) ; assertThat ( program . getFactoryObjectDeps ( PhysicalLink . class ) , is ( notNullValue ( ) ) ) ; assertThat ( program . getFactoryObjectDeps ( LinkLayer . class ) , is ( notNullValue ( ) ) ) ; assertThat ( program . getFactoryObjectDeps ( TransportLayer . class ) , is ( notNullValue ( ) ) ) ; try { program . getFactoryObjectDeps ( FactoryObject . class ) ; fail ( "Expecting exception" ) ; } catch ( IllegalArgumentException e ) { } try { program . getFactoryObjectDeps ( PhysicalLink . class ) . add ( "link 1" ) ; fail ( "expecting exception" ) ; } catch ( UnsupportedOperationException e ) { } }
Test getting factory object dependencies.
Test getting factory object dependencies .
//create a program with no dependencies //should not be null because they are initialized at construction of the program //verify that you cannot add to the list externally        