mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Part of ALF-4512: MLText and NULL storage problems
- Moved problems from SQL constraint violations to MLText conversion problems - TODO: Somehow single d:text when switching over to d:mltext git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22037 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -130,18 +130,24 @@ public class FullNodeServiceTest extends BaseNodeServiceTest
|
||||
|
||||
// Now create an MLText object with a null entry
|
||||
mlText = new MLText(null);
|
||||
nodeService.setProperty(rootNodeRef, BaseNodeServiceTest.PROP_QNAME_ML_TEXT_VALUE, null);
|
||||
nodeService.setProperty(rootNodeRef, BaseNodeServiceTest.PROP_QNAME_ML_TEXT_VALUE, mlText);
|
||||
MLText mlTextCheck = (MLText) nodeService.getProperty(rootNodeRef, BaseNodeServiceTest.PROP_QNAME_ML_TEXT_VALUE);
|
||||
assertNull("MLText value should have been converted to a null String", mlTextCheck);
|
||||
|
||||
// Set an ML value to null
|
||||
nodeService.setProperty(rootNodeRef, BaseNodeServiceTest.PROP_QNAME_ML_TEXT_VALUE, null);
|
||||
|
||||
// Do the same as ML-aware
|
||||
MLPropertyInterceptor.setMLAware(true);
|
||||
try
|
||||
{
|
||||
mlText = new MLText(null);
|
||||
nodeService.setProperty(rootNodeRef, BaseNodeServiceTest.PROP_QNAME_ML_TEXT_VALUE, null);
|
||||
nodeService.setProperty(rootNodeRef, BaseNodeServiceTest.PROP_QNAME_ML_TEXT_VALUE, mlText);
|
||||
mlTextCheck = (MLText) nodeService.getProperty(rootNodeRef, BaseNodeServiceTest.PROP_QNAME_ML_TEXT_VALUE);
|
||||
assertEquals("MLText value was not pulled out the same as it went in", mlText, mlTextCheck);
|
||||
|
||||
// Set an ML value to null
|
||||
nodeService.setProperty(rootNodeRef, BaseNodeServiceTest.PROP_QNAME_ML_TEXT_VALUE, null);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
Reference in New Issue
Block a user