mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
empty content test: trivial logging changes.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22738 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -7020,7 +7020,7 @@ public class TransferServiceImplTest extends BaseAlfrescoSpringTest
|
|||||||
String targetName = "testTransferEmptyContent";
|
String targetName = "testTransferEmptyContent";
|
||||||
TransferTarget transferMe;
|
TransferTarget transferMe;
|
||||||
NodeRef contentNodeRef;
|
NodeRef contentNodeRef;
|
||||||
NodeRef destNodeRef;
|
NodeRef savedDestinationNodeRef;
|
||||||
|
|
||||||
startNewTransaction();
|
startNewTransaction();
|
||||||
try
|
try
|
||||||
@@ -7062,7 +7062,7 @@ public class TransferServiceImplTest extends BaseAlfrescoSpringTest
|
|||||||
/**
|
/**
|
||||||
* Step 1: Transfer our node which has empty content
|
* Step 1: Transfer our node which has empty content
|
||||||
*/
|
*/
|
||||||
logger.debug("First transfer - create new node (empty content)");
|
logger.debug("testEmptyContent : First transfer - create new node (empty content)");
|
||||||
startNewTransaction();
|
startNewTransaction();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -7087,6 +7087,7 @@ public class TransferServiceImplTest extends BaseAlfrescoSpringTest
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
NodeRef destinationNodeRef = testNodeFactory.getMappedNodeRef(contentNodeRef);
|
NodeRef destinationNodeRef = testNodeFactory.getMappedNodeRef(contentNodeRef);
|
||||||
|
savedDestinationNodeRef = destinationNodeRef;
|
||||||
assertTrue("content node (dest) does not exist", nodeService.exists(destinationNodeRef));
|
assertTrue("content node (dest) does not exist", nodeService.exists(destinationNodeRef));
|
||||||
|
|
||||||
ContentReader reader = contentService.getReader(destinationNodeRef, ContentModel.PROP_CONTENT);
|
ContentReader reader = contentService.getReader(destinationNodeRef, ContentModel.PROP_CONTENT);
|
||||||
@@ -7103,7 +7104,7 @@ public class TransferServiceImplTest extends BaseAlfrescoSpringTest
|
|||||||
/**
|
/**
|
||||||
* Step 2: replace empty content with new content
|
* Step 2: replace empty content with new content
|
||||||
*/
|
*/
|
||||||
logger.debug("Second transfer - replace empty content with some content");
|
logger.debug("testEmptyContent : Second transfer - replace empty content with some content");
|
||||||
|
|
||||||
startNewTransaction();
|
startNewTransaction();
|
||||||
try
|
try
|
||||||
@@ -7146,10 +7147,12 @@ public class TransferServiceImplTest extends BaseAlfrescoSpringTest
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
NodeRef destinationNodeRef = testNodeFactory.getMappedNodeRef(contentNodeRef);
|
NodeRef destinationNodeRef = testNodeFactory.getMappedNodeRef(contentNodeRef);
|
||||||
|
|
||||||
|
assertEquals("test error destinationNodeRef not correct", savedDestinationNodeRef, destinationNodeRef);
|
||||||
ContentReader reader = contentService.getReader(destinationNodeRef, ContentModel.PROP_CONTENT);
|
ContentReader reader = contentService.getReader(destinationNodeRef, ContentModel.PROP_CONTENT);
|
||||||
|
assertNotNull("content reader is null", reader);
|
||||||
assertEquals("content encoding is wrong", reader.getEncoding(), CONTENT_ENCODING);
|
assertEquals("content encoding is wrong", reader.getEncoding(), CONTENT_ENCODING);
|
||||||
assertEquals("content locale is wrong", reader.getLocale(), CONTENT_LOCALE);
|
assertEquals("content locale is wrong", reader.getLocale(), CONTENT_LOCALE);
|
||||||
assertNotNull("content reader is null", reader);
|
|
||||||
assertTrue("content does not exist", reader.exists());
|
assertTrue("content does not exist", reader.exists());
|
||||||
String contentStr = reader.getContentString();
|
String contentStr = reader.getContentString();
|
||||||
assertEquals("Content is wrong", contentStr, CONTENT_STRING);
|
assertEquals("Content is wrong", contentStr, CONTENT_STRING);
|
||||||
@@ -7162,7 +7165,7 @@ public class TransferServiceImplTest extends BaseAlfrescoSpringTest
|
|||||||
/**
|
/**
|
||||||
* Step 3 - transition from a content property having content to one that is empty
|
* Step 3 - transition from a content property having content to one that is empty
|
||||||
*/
|
*/
|
||||||
logger.debug("Third transfer - remove existing content");
|
logger.debug("testEmptyContent : Third transfer - remove existing content");
|
||||||
|
|
||||||
startNewTransaction();
|
startNewTransaction();
|
||||||
try
|
try
|
||||||
|
Reference in New Issue
Block a user