XMLRepositoryManager xmlRepositoryMgr = new XMLRepositoryManager();
xmlRepositoryMgr.executeWith(new XMLRepositoryManager.RepositoryCommand() {
public void execute(RepositoryConnection repositoryConnection,
XMLRepository repository,
String repositoryDir) throws Exception {
ImageComponent ic = new ImageComponent("/testRemoveImageComponent.mimg");
ImageRepositoryManager manager =
new ImageRepositoryManager(repository);
manager.addImageComponent(repositoryConnection, ic);
containerExists(ic.getName(), false, repositoryConnection,
repository);
manager.removeImageComponent(repositoryConnection,
ic.getName());
containerExists(ic.getName(), true, repositoryConnection,
repository);
}
});
}