mil.dod.th.ose.integration/src/mil/dod/th/ose/controller/integration/core/TestMissionProgramManager.java
@Test
    public void testSimpleScriptScheduleAtRestart() throws IllegalArgumentException, MissionProgramException, 
        IOException, PersistenceFailedException, InterruptedException
    {
        //verify that the template was loaded
        assertThat(m_TemplateProgramManager.getMissionTemplateNames(), hasItem("simple-template"));
        //create parameters
        MissionProgramSchedule schedule = new MissionProgramSchedule(true, false, true, 
            null, null, System.currentTimeMillis() + 900000L);
        MissionProgramParameters params = new MissionProgramParameters().withTemplateName("simple-template").
            withSchedule(schedule).withParameters(new MapEntry("a", 99)).withProgramName("Test_Restart");

        EventHandlerSyncer executionSyncer = new EventHandlerSyncer(Program.TOPIC_PROGRAM_EXECUTED, 
                String.format("(%s=%s)", Program.EVENT_PROP_PROGRAM_NAME, "Test_Restart"));
        
        m_MissionProgramManager.loadParameters(params);

        executionSyncer.waitForEvent(5);
    }
/**
     * This tests that a simple script can execute with a schedule.
     * Verify that the program executes.
     * Verified that execution restarts in {@link TestPersistedMissionPrograms#testSimpleScriptScheduled()}
     */
This tests that a simple script can execute with a schedule.
Verify that the program executes.
This tests that a simple script can execute with a schedule . Verify that the program executes .
@Test
    public void testSimpleScriptScheduleAtRestart() throws IllegalArgumentException, MissionProgramException, 
        IOException, PersistenceFailedException, InterruptedException
    {
        assertThat(m_TemplateProgramManager.getMissionTemplateNames(), hasItem("simple-template"));
        MissionProgramSchedule schedule = new MissionProgramSchedule(true, false, true, 
            null, null, System.currentTimeMillis() + 900000L);
        MissionProgramParameters params = new MissionProgramParameters().withTemplateName("simple-template").
            withSchedule(schedule).withParameters(new MapEntry("a", 99)).withProgramName("Test_Restart");
        EventHandlerSyncer executionSyncer = new EventHandlerSyncer(Program.TOPIC_PROGRAM_EXECUTED, 
                String.format("(%s=%s)", Program.EVENT_PROP_PROGRAM_NAME, "Test_Restart"));
        m_MissionProgramManager.loadParameters(params);
        executionSyncer.waitForEvent(5);
    }
@ Test public void testSimpleScriptScheduleAtRestart ( ) throws IllegalArgumentException , MissionProgramException , IOException , PersistenceFailedException , InterruptedException { assertThat ( m_TemplateProgramManager . getMissionTemplateNames ( ) , hasItem ( "simple-template" ) ) ; MissionProgramSchedule schedule = new MissionProgramSchedule ( true , false , true , null , null , System . currentTimeMillis ( ) + 900000L ) ; MissionProgramParameters params = new MissionProgramParameters ( ) . withTemplateName ( "simple-template" ) . withSchedule ( schedule ) . withParameters ( new MapEntry ( "a" , 99 ) ) . withProgramName ( "Test_Restart" ) ; EventHandlerSyncer executionSyncer = new EventHandlerSyncer ( Program . TOPIC_PROGRAM_EXECUTED , String . format ( "(%s=%s)" , Program . EVENT_PROP_PROGRAM_NAME , "Test_Restart" ) ) ; m_MissionProgramManager . loadParameters ( params ) ; executionSyncer . waitForEvent ( 5 ) ; }
This tests that a simple script can execute with a schedule.
This tests that a simple script can execute with a schedule .
//verify that the template was loaded //create parameters