From: Aron Roberts Date: Thu, 10 Nov 2011 19:36:06 +0000 (+0000) Subject: CSPACE-3686: Comparisons of 'before and after' values of BigDecimal fields, which... X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=c434662562c2bd11163d8d6baae8d11e38eea03c;p=tmp%2Fjakarta-migration.git CSPACE-3686: Comparisons of 'before and after' values of BigDecimal fields, which result from xs:decimal datatypes in services XSDs, should be done via BigDecimal's compareTo() method, which is scale-agnostic. Change made in CollectionObjectServiceTest to reflect this; we can use this type of comparison elsewhere in services client tests, as well. --- diff --git a/services/collectionobject/client/src/test/java/org/collectionspace/services/client/test/CollectionObjectServiceTest.java b/services/collectionobject/client/src/test/java/org/collectionspace/services/client/test/CollectionObjectServiceTest.java index 8875a45e7..09c7b32ef 100644 --- a/services/collectionobject/client/src/test/java/org/collectionspace/services/client/test/CollectionObjectServiceTest.java +++ b/services/collectionobject/client/src/test/java/org/collectionspace/services/client/test/CollectionObjectServiceTest.java @@ -650,7 +650,7 @@ public class CollectionObjectServiceTest extends AbstractServiceTestImpl { Assert.assertTrue(dimensionSubGroups.size() > 0, "No dimension subgroups were returned"); DimensionSubGroup lengthDimension = dimensionSubGroups.get(0); Assert.assertNotNull(lengthDimension, "Length dimension was null"); - Assert.assertEquals(lengthDimension.getValue().setScale(5), DIMENSION_VALUE_LENGTH.setScale(5), + Assert.assertTrue(lengthDimension.getValue().compareTo(DIMENSION_VALUE_LENGTH) == 0, "Dimension length value returned didn't match expected value"); /* No longer part of the "default" domain service tests for the CollectionObject record.