mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merge 1.4 to HEAD
svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4351 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4352 . svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4353 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4354 . svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4354 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4362 . git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4657 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -153,6 +153,29 @@ public class RoutingContentServiceTest extends TestCase
|
||||
assertFalse(getUserTransaction() == getUserTransaction()); // ensure txn instances aren't shared
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that a valid writer into the content store can be retrieved and used.
|
||||
*/
|
||||
public void testSimpleNonTempWriter() throws Exception
|
||||
{
|
||||
ContentWriter writer = contentService.getWriter(null, null, false);
|
||||
assertNotNull("Writer should not be null", writer);
|
||||
assertNotNull("Content URL should not be null", writer.getContentUrl());
|
||||
|
||||
// write some content
|
||||
writer.putContent(SOME_CONTENT);
|
||||
writer.setMimetype(MimetypeMap.MIMETYPE_TEXT_PLAIN);
|
||||
writer.setEncoding("UTF8");
|
||||
|
||||
// set the content property manually
|
||||
nodeService.setProperty(contentNodeRef, ContentModel.PROP_CONTENT, writer.getContentData());
|
||||
|
||||
// get the reader
|
||||
ContentReader reader = contentService.getReader(contentNodeRef, ContentModel.PROP_CONTENT);
|
||||
assertNotNull("Reader should not be null", reader);
|
||||
assertNotNull("Content URL should not be null", reader.getContentUrl());
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the URL, mimetype and encoding are automatically set on the readers
|
||||
* and writers
|
||||
|
Reference in New Issue
Block a user