@@ -36,7 +36,7 @@ public void testRangeValidationWithError() throws Exception {
36
36
//Explicitly set an out-of-range double for DoubleRangeValidatorTest
37
37
Map <String , Object > context = new HashMap <>();
38
38
HashMap <String , Object > params = new HashMap <>();
39
- params .put ("percentage" , 100.0123d );
39
+ params .put ("percentage" , 100.12 );
40
40
context .put (ActionContext .PARAMETERS , HttpParameters .create (params ).build ());
41
41
42
42
ActionProxy proxy = actionProxyFactory .createActionProxy ("" , MockConfigurationProvider .VALIDATION_ACTION_NAME , null , context );
@@ -50,8 +50,8 @@ public void testRangeValidationWithError() throws Exception {
50
50
assertEquals (1 , errorMessages .size ());
51
51
52
52
String errorMessage = errorMessages .get (0 );
53
- assertNotNull ("Expecting: percentage must be between 0.1 and 10.1, current value is 100.0123 ." , errorMessage );
54
- assertEquals ("percentage must be between 0.1 and 10.1, current value is 100.0123 ." , errorMessage );
53
+ assertNotNull ("Expecting: percentage must be between 0.1 and 10.1, current value is 100.12 ." , errorMessage );
54
+ assertEquals ("percentage must be between 0.1 and 10.1, current value is 100.12 ." , errorMessage );
55
55
}
56
56
57
57
public void testRangeValidationNoError () throws Exception {
@@ -192,7 +192,7 @@ public void testRangeValidationWithExpressionsFail() throws Exception {
192
192
//Explicitly set an out-of-range double for DoubleRangeValidatorTest
193
193
Map <String , Object > context = new HashMap <>();
194
194
HashMap <String , Object > params = new HashMap <>();
195
- params .put ("percentage" , 100.0123d );
195
+ params .put ("percentage" , 100.12 );
196
196
context .put (ActionContext .PARAMETERS , HttpParameters .create (params ).build ());
197
197
198
198
ActionProxy proxy = actionProxyFactory .createActionProxy ("" , MockConfigurationProvider .EXPRESSION_VALIDATION_ACTION , null , context );
@@ -205,8 +205,8 @@ public void testRangeValidationWithExpressionsFail() throws Exception {
205
205
assertEquals (1 , errorMessages .size ());
206
206
207
207
String errorMessage = errorMessages .get (0 );
208
- assertNotNull ("Expecting: percentage must be between 0.1 and 10.1, current value is 100.0123 ." , errorMessage );
209
- assertEquals ("percentage must be between 0.1 and 10.1, current value is 100.0123 ." , errorMessage );
208
+ assertNotNull ("Expecting: percentage must be between 0.1 and 10.1, current value is 100.12 ." , errorMessage );
209
+ assertEquals ("percentage must be between 0.1 and 10.1, current value is 100.12 ." , errorMessage );
210
210
}
211
211
212
212
public void testExpressionParams () throws Exception {
0 commit comments