mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix date sort checking to handle equality, which applies to both ascending and descending
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28752 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -273,6 +273,12 @@ public class BlogServiceImplTest
|
|||||||
Date date1 = (Date) NODE_SERVICE.getProperty(nodeRef1, property);
|
Date date1 = (Date) NODE_SERVICE.getProperty(nodeRef1, property);
|
||||||
Date date2 = (Date) NODE_SERVICE.getProperty(nodeRef2, property);
|
Date date2 = (Date) NODE_SERVICE.getProperty(nodeRef2, property);
|
||||||
|
|
||||||
|
// Equal dates are applicable to either sort order
|
||||||
|
if (date1.equals(date2))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (ascendingOrder)
|
if (ascendingOrder)
|
||||||
{
|
{
|
||||||
assertTrue("BlogPosts not asc-sorted by " + property + ". Error at index " + i, date1.before(date2));
|
assertTrue("BlogPosts not asc-sorted by " + property + ". Error at index " + i, date1.before(date2));
|
||||||
|
Reference in New Issue
Block a user