mil.dod.th.ose.core.integration/src/mil/dod/th/ose/core/integration/TestFactoryObject.java
public void testExtensions() throws Exception
    {
        AssetDirectoryService assetDirectoryService = ServiceUtils.getService(m_Context, AssetDirectoryService.class);
        
        Asset asset = assetDirectoryService.createAsset(ExampleAsset.class.getName());

        ExampleAssetExtension1 ext1 = asset.getExtension(ExampleAssetExtension1.class);
        assertThat(ext1.addSuffix("blah"), is(asset.getName() + "blah"));
        
        ExampleAssetExtension2 ext2 = asset.getExtension(ExampleAssetExtension2.class);
        ext2.performFunction();       
    }
/**
     * Verify an extension can be retrieved and called upon.
     */
Verify an extension can be retrieved and called upon.
Verify an extension can be retrieved and called upon .
public void testExtensions() throws Exception
    {
        AssetDirectoryService assetDirectoryService = ServiceUtils.getService(m_Context, AssetDirectoryService.class);
        Asset asset = assetDirectoryService.createAsset(ExampleAsset.class.getName());
        ExampleAssetExtension1 ext1 = asset.getExtension(ExampleAssetExtension1.class);
        assertThat(ext1.addSuffix("blah"), is(asset.getName() + "blah"));
        ExampleAssetExtension2 ext2 = asset.getExtension(ExampleAssetExtension2.class);
        ext2.performFunction();       
    }
public void testExtensions ( ) throws Exception { AssetDirectoryService assetDirectoryService = ServiceUtils . getService ( m_Context , AssetDirectoryService . class ) ; Asset asset = assetDirectoryService . createAsset ( ExampleAsset . class . getName ( ) ) ; ExampleAssetExtension1 ext1 = asset . getExtension ( ExampleAssetExtension1 . class ) ; assertThat ( ext1 . addSuffix ( "blah" ) , is ( asset . getName ( ) + "blah" ) ) ; ExampleAssetExtension2 ext2 = asset . getExtension ( ExampleAssetExtension2 . class ) ; ext2 . performFunction ( ) ; }
Verify an extension can be retrieved and called upon.
Verify an extension can be retrieved and called upon .