mil.dod.th.ose.integration/src/mil/dod/th/ose/controller/integration/core/TestPersistedMissionPrograms.java
@Test
    public void testPersistedMissionExecArgs() throws IllegalStateException, MissionProgramException, 
        InterruptedException
    {
        //register primitive test Service
        final TestPrimitivesService service = new TestPrimitivesService();        
        IntegrationTestRunner.getBundleContext().registerService(TestPrimitivesService.class, service, null); 
        
        // wait for program to execute
        EventHandlerSyncer programExecutedSyncer = 
                new EventHandlerSyncer(Program.TOPIC_PROGRAM_EXECUTED, "(name=Test_Diff_Auto_Args)");
        
        //get the program made during prep for second run of tests
        Program program = m_MissionProgramManager.getProgram("Test_Diff_Auto_Args");
        //check that program persisted 
        assertThat(program, is(notNullValue()));
        program.execute();
        
        //wait for event
        programExecutedSyncer.waitForEvent(5);
        //if the program is executed successfully the status will be executed, if params are not restored properly
        //the script execution will throw an error and the status will not be executed.
        assertThat(program.getProgramStatus(), is(ProgramStatus.EXECUTED));  
    }
/**
     * Tests that missions with different types of execution parameters are correctly recreated upon system restart.
     * See {@link mil.dod.th.ose.controller.integration.TestPrepFor2ndRun#testCreateMissionProgram()}.
     */
Tests that missions with different types of execution parameters are correctly recreated upon system restart.
Tests that missions with different types of execution parameters are correctly recreated upon system restart .
@Test
    public void testPersistedMissionExecArgs() throws IllegalStateException, MissionProgramException, 
        InterruptedException
    {
        final TestPrimitivesService service = new TestPrimitivesService();        
        IntegrationTestRunner.getBundleContext().registerService(TestPrimitivesService.class, service, null); 
        EventHandlerSyncer programExecutedSyncer = 
                new EventHandlerSyncer(Program.TOPIC_PROGRAM_EXECUTED, "(name=Test_Diff_Auto_Args)");
        Program program = m_MissionProgramManager.getProgram("Test_Diff_Auto_Args");
        assertThat(program, is(notNullValue()));
        program.execute();
        programExecutedSyncer.waitForEvent(5);
        assertThat(program.getProgramStatus(), is(ProgramStatus.EXECUTED));  
    }
@ Test public void testPersistedMissionExecArgs ( ) throws IllegalStateException , MissionProgramException , InterruptedException { final TestPrimitivesService service = new TestPrimitivesService ( ) ; IntegrationTestRunner . getBundleContext ( ) . registerService ( TestPrimitivesService . class , service , null ) ; EventHandlerSyncer programExecutedSyncer = new EventHandlerSyncer ( Program . TOPIC_PROGRAM_EXECUTED , "(name=Test_Diff_Auto_Args)" ) ; Program program = m_MissionProgramManager . getProgram ( "Test_Diff_Auto_Args" ) ; assertThat ( program , is ( notNullValue ( ) ) ) ; program . execute ( ) ; programExecutedSyncer . waitForEvent ( 5 ) ; assertThat ( program . getProgramStatus ( ) , is ( ProgramStatus . EXECUTED ) ) ; }
Tests that missions with different types of execution parameters are correctly recreated upon system restart.
Tests that missions with different types of execution parameters are correctly recreated upon system restart .
//register primitive test Service // wait for program to execute //get the program made during prep for second run of tests //check that program persisted  //wait for event //if the program is executed successfully the status will be executed, if params are not restored properly //the script execution will throw an error and the status will not be executed.