mil.dod.th.ose.remote.integration/src/mil/dod/th/ose/remote/integration/namespace/TestMissionProgrammingNamespace.java
@Test
    public void testShutdown() throws UnknownHostException, IOException, InterruptedException, InterruptedException
    {
        m_MissionName = "shutdownProgram";
        
        //create schedule
        MissionProgramParametersGen.MissionProgramSchedule schedule = MissionProgramParametersGen.
                MissionProgramSchedule.newBuilder().setActive(true).setImmediately(true).
                setStopInterval(System.currentTimeMillis() + 5000000).build();
         
        //need separate asset so it isn't attempted to remove twice
        UUID localAssetUuid = AssetNamespaceUtils.createAsset(m_Socket, ExampleAsset.class.getName(), "shutdownAsset1",
                null).getInfo().getUuid();
        
        //create mission program parameters
        MissionProgramParametersGen.MissionProgramParameters params = 
            MissionProgramNamespaceUtils.genTimedDataLoopParams(schedule, "shutdownAsset1", m_MissionName);

        //load the parameters
        MissionProgramNamespaceUtils.loadParameters(m_Socket, params);
        
        //execution shutdown
        MissionProgramNamespaceUtils.shutdownExecutedMission(m_Socket, m_MissionName);
        //cleanup
        AssetNamespaceUtils.removeAsset(m_Socket, localAssetUuid);
    }
/**
     * Test requesting the shutdown of a mission program.
     * Verify the mission is canceled.
     */
Test requesting the shutdown of a mission program.
Verify the mission is canceled.
Test requesting the shutdown of a mission program . Verify the mission is canceled .
@Test
    public void testShutdown() throws UnknownHostException, IOException, InterruptedException, InterruptedException
    {
        m_MissionName = "shutdownProgram";
        MissionProgramParametersGen.MissionProgramSchedule schedule = MissionProgramParametersGen.
                MissionProgramSchedule.newBuilder().setActive(true).setImmediately(true).
                setStopInterval(System.currentTimeMillis() + 5000000).build();
        UUID localAssetUuid = AssetNamespaceUtils.createAsset(m_Socket, ExampleAsset.class.getName(), "shutdownAsset1",
                null).getInfo().getUuid();
        MissionProgramParametersGen.MissionProgramParameters params = 
            MissionProgramNamespaceUtils.genTimedDataLoopParams(schedule, "shutdownAsset1", m_MissionName);
        MissionProgramNamespaceUtils.loadParameters(m_Socket, params);
        MissionProgramNamespaceUtils.shutdownExecutedMission(m_Socket, m_MissionName);
        AssetNamespaceUtils.removeAsset(m_Socket, localAssetUuid);
    }
@ Test public void testShutdown ( ) throws UnknownHostException , IOException , InterruptedException , InterruptedException { m_MissionName = "shutdownProgram" ; MissionProgramParametersGen . MissionProgramSchedule schedule = MissionProgramParametersGen . MissionProgramSchedule . newBuilder ( ) . setActive ( true ) . setImmediately ( true ) . setStopInterval ( System . currentTimeMillis ( ) + 5000000 ) . build ( ) ; UUID localAssetUuid = AssetNamespaceUtils . createAsset ( m_Socket , ExampleAsset . class . getName ( ) , "shutdownAsset1" , null ) . getInfo ( ) . getUuid ( ) ; MissionProgramParametersGen . MissionProgramParameters params = MissionProgramNamespaceUtils . genTimedDataLoopParams ( schedule , "shutdownAsset1" , m_MissionName ) ; MissionProgramNamespaceUtils . loadParameters ( m_Socket , params ) ; MissionProgramNamespaceUtils . shutdownExecutedMission ( m_Socket , m_MissionName ) ; AssetNamespaceUtils . removeAsset ( m_Socket , localAssetUuid ) ; }
Test requesting the shutdown of a mission program.
Test requesting the shutdown of a mission program .
//create schedule //need separate asset so it isn't attempted to remove twice //create mission program parameters //load the parameters //execution shutdown //cleanup