mil.dod.th.ose.core.integration/src/mil/dod/th/ose/core/integration/TestAssetDirectoryService.java
public void testExecuteCommand_Invalid() throws Exception
    {
        AssetDirectoryService assetDirectoryService = ServiceUtils.getService(m_Context, AssetDirectoryService.class);
        
        Asset asset = assetDirectoryService.createAsset(ExampleAsset.class.getName());
        
        //verify override if false as GPS is not available per caps, default is true if caps aren't available
        assertThat(asset.getConfig().pluginOverridesPosition(), is(false));
        
        //location
        final Command setPos = new SetPositionCommand().withLocation(SpatialTypesFactory.newCoordinates(3000, -1000));
        try
        {
            asset.executeCommand(setPos);
            fail("Expecting exception as coordinate is out of range");
        }
        catch (CommandExecutionException e) { }
    }
/**
     * Verify a command that contains data outside the ranges defined by the schema will result in an exception.
     */
Verify a command that contains data outside the ranges defined by the schema will result in an exception.
Verify a command that contains data outside the ranges defined by the schema will result in an exception .
public void testExecuteCommand_Invalid() throws Exception
    {
        AssetDirectoryService assetDirectoryService = ServiceUtils.getService(m_Context, AssetDirectoryService.class);
        Asset asset = assetDirectoryService.createAsset(ExampleAsset.class.getName());
        assertThat(asset.getConfig().pluginOverridesPosition(), is(false));
        final Command setPos = new SetPositionCommand().withLocation(SpatialTypesFactory.newCoordinates(3000, -1000));
        try
        {
            asset.executeCommand(setPos);
            fail("Expecting exception as coordinate is out of range");
        }
        catch (CommandExecutionException e) { }
    }
public void testExecuteCommand_Invalid ( ) throws Exception { AssetDirectoryService assetDirectoryService = ServiceUtils . getService ( m_Context , AssetDirectoryService . class ) ; Asset asset = assetDirectoryService . createAsset ( ExampleAsset . class . getName ( ) ) ; assertThat ( asset . getConfig ( ) . pluginOverridesPosition ( ) , is ( false ) ) ; final Command setPos = new SetPositionCommand ( ) . withLocation ( SpatialTypesFactory . newCoordinates ( 3000 , - 1000 ) ) ; try { asset . executeCommand ( setPos ) ; fail ( "Expecting exception as coordinate is out of range" ) ; } catch ( CommandExecutionException e ) { } }
Verify a command that contains data outside the ranges defined by the schema will result in an exception.
Verify a command that contains data outside the ranges defined by the schema will result in an exception .
//verify override if false as GPS is not available per caps, default is true if caps aren't available //location