mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-5733 Changed the way retention as of date is calculated.
This commit is contained in:
@@ -102,7 +102,7 @@ public class BroadcastDispositionActionDefinitionUpdateActionUnitTest
|
||||
when(mockAction.getName()).thenReturn("mockAction");
|
||||
// Set up the disposition service to return a known "disposition as of" date.
|
||||
Date asOfDate = new Date();
|
||||
when(mockDispositionService.calculateAsOfDate(CONTENT_NODE_REF, mockDispositionActionDefinition, false))
|
||||
when(mockDispositionService.calculateAsOfDate(CONTENT_NODE_REF, mockDispositionActionDefinition))
|
||||
.thenReturn(asOfDate);
|
||||
|
||||
// Call the method under test.
|
||||
@@ -160,7 +160,7 @@ public class BroadcastDispositionActionDefinitionUpdateActionUnitTest
|
||||
when(mockAction.getParameterValue(CHANGED_PROPERTIES)).thenReturn((Serializable) asList(PROP_DISPOSITION_PERIOD_PROPERTY));
|
||||
// Set up the expected "as of" date.
|
||||
Date newAsOfDate = new Date(123456789000L);
|
||||
when(mockDispositionService.calculateAsOfDate(recordNode, mockActionDefinition, false)).thenReturn(newAsOfDate);
|
||||
when(mockDispositionService.calculateAsOfDate(recordNode, mockActionDefinition)).thenReturn(newAsOfDate);
|
||||
|
||||
// Call the method under test.
|
||||
action.executeImpl(mockAction, definitionNode);
|
||||
|
@@ -82,7 +82,7 @@ public class DispositionServiceImplUnitTest
|
||||
when(mockPeriod.getNextDate(createdDate)).thenReturn(nextDate);
|
||||
|
||||
// Call the method under test.
|
||||
Date asOfDate = dispositionService.calculateAsOfDate(CONTENT_NODE_REF, mockDispositionActionDefinition, true);
|
||||
Date asOfDate = dispositionService.calculateAsOfDate(CONTENT_NODE_REF, mockDispositionActionDefinition);
|
||||
|
||||
assertEquals("Unexpected calculation for 'as of' date", nextDate, asOfDate);
|
||||
}
|
||||
@@ -95,7 +95,7 @@ public class DispositionServiceImplUnitTest
|
||||
when(mockDispositionActionDefinition.getPeriod()).thenReturn(null);
|
||||
|
||||
// Call the method under test.
|
||||
Date asOfDate = dispositionService.calculateAsOfDate(CONTENT_NODE_REF, mockDispositionActionDefinition, true);
|
||||
Date asOfDate = dispositionService.calculateAsOfDate(CONTENT_NODE_REF, mockDispositionActionDefinition);
|
||||
|
||||
assertNull("It should not be possible to determine the 'as of' date.", asOfDate);
|
||||
}
|
||||
|
Reference in New Issue
Block a user