Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)

105991: Merged 5.0.N (5.0.3) to HEAD-BUG-FIX (5.1/Cloud)
      105915: Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.3)
         105898: MNT-13901 TransformationOptions Timeout Can Not Easily Be Set
            - Fix "TransformationOptionPair.setMax(long max) and TransformationOptionPair.setLimit(long limit) so that they don't
              clear the other half of the pair when the value being set is < 0 (unset).
            - Unit tests added
            - Added comments about how the 'transformer' code builds up limits to include defaults.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@106013 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-06-12 10:33:47 +00:00
parent b249a2d9b9
commit 3a8602f46c
4 changed files with 50 additions and 6 deletions

View File

@@ -131,6 +131,26 @@ public class TransformationOptionPairTest
assertEquals("Getter did not return set value", value, actual);
}
@Test
public void testSetMaxClearLimit() throws Exception
{
long value = 1234;
pair.setMax(value, null);
pair.setLimit(-1, null);
long actual = pair.getMax();
assertEquals("Getter did not return set value", value, actual);
}
@Test
public void testSetLimitClearMax() throws Exception
{
long value = 1234;
pair.setLimit(value, null);
pair.setMax(-1, null);
long actual = pair.getLimit();
assertEquals("Getter did not return set value", value, actual);
}
@Test
public void testSetClearSet() throws Exception
{