mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/mp/TestProgramImpl.java
@Test
    public void testCancelTrue() throws MissionProgramException, InterruptedException, 
           ExecutionException
    {
        //mission information
        ProgramImpl program = createProgram("test");

        program.changeStatus(ProgramStatus.WAITING_UNINITIALIZED);
        program.changeStatus(ProgramStatus.WAITING_INITIALIZED);
        program.changeStatus(ProgramStatus.SCHEDULED);

        when(m_Manager.cancelProgram("test")).thenReturn(true);
        
        //request
        boolean bool = program.cancel();
        
        assertThat(bool, is(true));
    }
/**
     * Test that the program can be called to cancel scheduled execution.
     * 
     */
Test that the program can be called to cancel scheduled execution.
Test that the program can be called to cancel scheduled execution .
@Test
    public void testCancelTrue() throws MissionProgramException, InterruptedException, 
           ExecutionException
    {
        ProgramImpl program = createProgram("test");
        program.changeStatus(ProgramStatus.WAITING_UNINITIALIZED);
        program.changeStatus(ProgramStatus.WAITING_INITIALIZED);
        program.changeStatus(ProgramStatus.SCHEDULED);
        when(m_Manager.cancelProgram("test")).thenReturn(true);
        boolean bool = program.cancel();
        assertThat(bool, is(true));
    }
@ Test public void testCancelTrue ( ) throws MissionProgramException , InterruptedException , ExecutionException { ProgramImpl program = createProgram ( "test" ) ; program . changeStatus ( ProgramStatus . WAITING_UNINITIALIZED ) ; program . changeStatus ( ProgramStatus . WAITING_INITIALIZED ) ; program . changeStatus ( ProgramStatus . SCHEDULED ) ; when ( m_Manager . cancelProgram ( "test" ) ) . thenReturn ( true ) ; boolean bool = program . cancel ( ) ; assertThat ( bool , is ( true ) ) ; }
Test that the program can be called to cancel scheduled execution.
Test that the program can be called to cancel scheduled execution .
//mission information //request