mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/mp/TestMissionProgramSchedulerImpl.java
@Test
    public void testShutdownProgram() throws InterruptedException
    {
        m_SUT.activate();
        m_SUT.shutdownProgram(m_Program1);
        
        ArgumentCaptor<Event> eventCaptor = ArgumentCaptor.forClass(Event.class);
        //once for shutdown topic (mocked status changes do not post events)
        verify(m_EventAdmin, timeout(100).times (1)).postEvent(eventCaptor.capture());
        
        assertThat(eventCaptor.getValue().getTopic(), 
                is(Program.TOPIC_PROGRAM_SHUTDOWN));
        assertProgramEventProps(eventCaptor.getValue(), m_Program1);

        verify(m_Program1).changeStatus(ProgramStatus.SHUTTING_DOWN);
        verify(m_Program1).changeStatus(ProgramStatus.SHUTDOWN);
    }
/**
     * Test that a program can be shutdown.
     */
Test that a program can be shutdown.
Test that a program can be shutdown .
@Test
    public void testShutdownProgram() throws InterruptedException
    {
        m_SUT.activate();
        m_SUT.shutdownProgram(m_Program1);
        ArgumentCaptor<Event> eventCaptor = ArgumentCaptor.forClass(Event.class);
        verify(m_EventAdmin, timeout(100).times (1)).postEvent(eventCaptor.capture());
        assertThat(eventCaptor.getValue().getTopic(), 
                is(Program.TOPIC_PROGRAM_SHUTDOWN));
        assertProgramEventProps(eventCaptor.getValue(), m_Program1);
        verify(m_Program1).changeStatus(ProgramStatus.SHUTTING_DOWN);
        verify(m_Program1).changeStatus(ProgramStatus.SHUTDOWN);
    }
@ Test public void testShutdownProgram ( ) throws InterruptedException { m_SUT . activate ( ) ; m_SUT . shutdownProgram ( m_Program1 ) ; ArgumentCaptor < Event > eventCaptor = ArgumentCaptor . forClass ( Event . class ) ; verify ( m_EventAdmin , timeout ( 100 ) . times ( 1 ) ) . postEvent ( eventCaptor . capture ( ) ) ; assertThat ( eventCaptor . getValue ( ) . getTopic ( ) , is ( Program . TOPIC_PROGRAM_SHUTDOWN ) ) ; assertProgramEventProps ( eventCaptor . getValue ( ) , m_Program1 ) ; verify ( m_Program1 ) . changeStatus ( ProgramStatus . SHUTTING_DOWN ) ; verify ( m_Program1 ) . changeStatus ( ProgramStatus . SHUTDOWN ) ; }
Test that a program can be shutdown.
Test that a program can be shutdown .
//once for shutdown topic (mocked status changes do not post events)