mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/mp/TestProgramImpl.java
@Test
    public void testGetFlagsStartStop()
    {
        ProgramImpl program = new ProgramImpl(m_Manager, m_EventAdmin, new MissionProgramTemplate().
            withSource("Fish").withName("Snake").withWithInterval(true).withWithImageCapture(true).
            withWithSensorTrigger(false), new MissionProgramParameters().withSchedule(new MissionProgramSchedule().
                withStartInterval(4L).withActive(true).withStopInterval(7L)), UUID.randomUUID());
        
        //get the value of each flag.
        assertThat(program.getFlag(FlagEnum.WITH_IMAGE_CAPTURE), is(true));
        assertThat(program.getFlag(FlagEnum.WITH_TIMER_TRIGGER), is(false));
        assertThat(program.getFlag(FlagEnum.WITH_SENSOR_TRIGGER), is(false));
        assertThat(program.getFlag(FlagEnum.WITH_INTERVAL), is(true));
        assertThat(program.getScheduleFlag(ScheduleEnum.START_AT_RESTART), is(false));
        assertThat(program.getScheduleFlag(ScheduleEnum.START_IMMEDIATELY), is(false));
        assertThat(program.getScheduleFlag(ScheduleEnum.WITH_INDEFINITE_INTERVAL), is(false));
        assertThat(program.getScheduleFlag(ScheduleEnum.IS_ACTIVE), is(true));
    }
/**
     * Test getting the flag values when the there is start/stop times.
     */
Test getting the flag values when the there is start/stop times.
Test getting the flag values when the there is start / stop times .
@Test
    public void testGetFlagsStartStop()
    {
        ProgramImpl program = new ProgramImpl(m_Manager, m_EventAdmin, new MissionProgramTemplate().
            withSource("Fish").withName("Snake").withWithInterval(true).withWithImageCapture(true).
            withWithSensorTrigger(false), new MissionProgramParameters().withSchedule(new MissionProgramSchedule().
                withStartInterval(4L).withActive(true).withStopInterval(7L)), UUID.randomUUID());
        assertThat(program.getFlag(FlagEnum.WITH_IMAGE_CAPTURE), is(true));
        assertThat(program.getFlag(FlagEnum.WITH_TIMER_TRIGGER), is(false));
        assertThat(program.getFlag(FlagEnum.WITH_SENSOR_TRIGGER), is(false));
        assertThat(program.getFlag(FlagEnum.WITH_INTERVAL), is(true));
        assertThat(program.getScheduleFlag(ScheduleEnum.START_AT_RESTART), is(false));
        assertThat(program.getScheduleFlag(ScheduleEnum.START_IMMEDIATELY), is(false));
        assertThat(program.getScheduleFlag(ScheduleEnum.WITH_INDEFINITE_INTERVAL), is(false));
        assertThat(program.getScheduleFlag(ScheduleEnum.IS_ACTIVE), is(true));
    }
@ Test public void testGetFlagsStartStop ( ) { ProgramImpl program = new ProgramImpl ( m_Manager , m_EventAdmin , new MissionProgramTemplate ( ) . withSource ( "Fish" ) . withName ( "Snake" ) . withWithInterval ( true ) . withWithImageCapture ( true ) . withWithSensorTrigger ( false ) , new MissionProgramParameters ( ) . withSchedule ( new MissionProgramSchedule ( ) . withStartInterval ( 4L ) . withActive ( true ) . withStopInterval ( 7L ) ) , UUID . randomUUID ( ) ) ; assertThat ( program . getFlag ( FlagEnum . WITH_IMAGE_CAPTURE ) , is ( true ) ) ; assertThat ( program . getFlag ( FlagEnum . WITH_TIMER_TRIGGER ) , is ( false ) ) ; assertThat ( program . getFlag ( FlagEnum . WITH_SENSOR_TRIGGER ) , is ( false ) ) ; assertThat ( program . getFlag ( FlagEnum . WITH_INTERVAL ) , is ( true ) ) ; assertThat ( program . getScheduleFlag ( ScheduleEnum . START_AT_RESTART ) , is ( false ) ) ; assertThat ( program . getScheduleFlag ( ScheduleEnum . START_IMMEDIATELY ) , is ( false ) ) ; assertThat ( program . getScheduleFlag ( ScheduleEnum . WITH_INDEFINITE_INTERVAL ) , is ( false ) ) ; assertThat ( program . getScheduleFlag ( ScheduleEnum . IS_ACTIVE ) , is ( true ) ) ; }
Test getting the flag values when the there is start/stop times.
Test getting the flag values when the there is start / stop times .
//get the value of each flag.