mil.dod.th.ose.core.integration/src/mil/dod/th/ose/core/integration/TestAssetDirectoryService.java
public final void testDelete() throws Exception
    {
        AssetDirectoryService assetDirectoryService = ServiceUtils.getService(m_Context, AssetDirectoryService.class);
        assertThat(assetDirectoryService, is(notNullValue()));
        
        Asset asset = assetDirectoryService.createAsset(ExampleAsset.class.getName(), "AssetToBeDeleted");
        
        asset.delete();
        
        // if correctly removed, should find again in scan
        assertThat(assetDirectoryService.getAssetsByType(ExampleAsset.class.getName()).size(), is(0));
        
        // verify asset can be created again with the same name
        assetDirectoryService.createAsset(ExampleAsset.class.getName(), "AssetToBeDeleted");
    }
/**
     * Verify that an Asset can be deleted.
     */
Verify that an Asset can be deleted.
Verify that an Asset can be deleted .
public final void testDelete() throws Exception
    {
        AssetDirectoryService assetDirectoryService = ServiceUtils.getService(m_Context, AssetDirectoryService.class);
        assertThat(assetDirectoryService, is(notNullValue()));
        Asset asset = assetDirectoryService.createAsset(ExampleAsset.class.getName(), "AssetToBeDeleted");
        asset.delete();
        assertThat(assetDirectoryService.getAssetsByType(ExampleAsset.class.getName()).size(), is(0));
        assetDirectoryService.createAsset(ExampleAsset.class.getName(), "AssetToBeDeleted");
    }
public final void testDelete ( ) throws Exception { AssetDirectoryService assetDirectoryService = ServiceUtils . getService ( m_Context , AssetDirectoryService . class ) ; assertThat ( assetDirectoryService , is ( notNullValue ( ) ) ) ; Asset asset = assetDirectoryService . createAsset ( ExampleAsset . class . getName ( ) , "AssetToBeDeleted" ) ; asset . delete ( ) ; assertThat ( assetDirectoryService . getAssetsByType ( ExampleAsset . class . getName ( ) ) . size ( ) , is ( 0 ) ) ; assetDirectoryService . createAsset ( ExampleAsset . class . getName ( ) , "AssetToBeDeleted" ) ; }
Verify that an Asset can be deleted.
Verify that an Asset can be deleted .
// if correctly removed, should find again in scan // verify asset can be created again with the same name