ImageRepositoryManager imageRepositoryManager=
new ImageRepositoryManager(repository);
ImageComponent component=
new ImageComponent(assetName);
ConvertibleImageAsset asset =
new ConvertibleImageAsset(assetName,
pixelsX,
pixelsY,
pixelDepth,
rendering,
encoding,
assetGroup,
assetValue);
imageRepositoryManager.addImageComponent(repositoryConnection,component);
imageRepositoryManager.addConvertibleImageAsset(repositoryConnection,asset);
//
// Make a copy of our convertible image asset.
//
component.setName(newAssetName);
imageRepositoryManager.addImageComponent(repositoryConnection,component);
imageRepositoryManager.copyConvertibleImageAsset(repositoryConnection,
assetName,
newAssetName);
ConvertibleImageAsset asset2 = imageRepositoryManager.
retrieveConvertibleImageAsset (
repositoryConnection,
newAssetName);
Assert.assertTrue("public void copyConvertibleImageAsset(RepositoryConnection,String,String) throws RepositoryException asset group name not equal.",asset.getAssetGroupName().equals(asset2.getAssetGroupName()));
Assert.assertTrue("public void copyConvertibleImageAsset(RepositoryConnection,String,String) throws RepositoryException value not equal.",asset.getValue().equals(asset2.getValue()));
}
});
}