mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
RM-2477 Treat the empty string in the same way as null.
Fix an issue in the behaviour checking where the empty string was being passed as the instructions when nothing was set. +review RM git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@109843 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -98,4 +98,16 @@ public class ClassifiedAspectUnitTest implements ClassifiedContentModel
|
||||
|
||||
classifiedAspect.checkConsistencyOfProperties(NODE_REF);
|
||||
}
|
||||
|
||||
/** Check that blank instructions are treated in the same way as null instructions. */
|
||||
@Test(expected = MissingDowngradeInstructions.class)
|
||||
public void testCheckConsistencyOfProperties_emptyStringsSupplied()
|
||||
{
|
||||
when(mockNodeService.hasAspect(NODE_REF, ASPECT_CLASSIFIED)).thenReturn(true);
|
||||
when(mockNodeService.getProperty(NODE_REF, PROP_DOWNGRADE_DATE)).thenReturn("");
|
||||
when(mockNodeService.getProperty(NODE_REF, PROP_DOWNGRADE_EVENT)).thenReturn("Event");
|
||||
when(mockNodeService.getProperty(NODE_REF, PROP_DOWNGRADE_INSTRUCTIONS)).thenReturn("");
|
||||
|
||||
classifiedAspect.checkConsistencyOfProperties(NODE_REF);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user