*/
@Ignore ( "Not Ready to Run." )
@Test
public void addImageToContentlet () throws Exception {
File testFile = null;
try {
String RELATION_TYPE = new File().getType();
//Getting a known structure
Structure structure = structures.iterator().next();
//Search the contentlets for this structure
List<Contentlet> contentletList = contentletAPI.findByStructure( structure, user, false, 0, 0 );
Contentlet contentlet = contentletList.iterator().next();
//Creating the test file
testFile = createFile( ContentletAPITest.class.getResource( "test_files/test.gif" ), "test.gif" );
/*//Gettting the related files to this contentlet
List<File> files = contentletAPI.getRelatedFiles( contentlet, user, false );//TODO: This method is not working but we are not testing it on this call....
if ( files == null ) {
files = new ArrayList<File>();
}
int initialSize = files.size();*/
//Adding the file to the contentlet
contentletAPI.addImageToContentlet( contentlet, testFile.getInode(), RELATION_TYPE, user, false );
//Gettting the related files to this contentlet
//List<File> finalFiles = contentletAPI.getRelatedFiles( contentlet, user, false );//TODO: This method is not working but we are not testing it on this call....
//Get the contentlet Identifier to gather the menu links