fixed failing test
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#Thu Jul 03 00:22:38 EDT 2008
|
||||
#Thu Jul 10 09:39:34 BST 2008
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.codeComplete.argumentPrefixes=
|
||||
org.eclipse.jdt.core.codeComplete.argumentSuffixes=
|
||||
|
||||
@@ -32,7 +32,22 @@ import org.springframework.binding.expression.support.AbstractExpressionParser;
|
||||
*/
|
||||
public class BeanWrapperExpressionParser extends AbstractExpressionParser {
|
||||
|
||||
private ConversionService conversionService = new DefaultConversionService();
|
||||
private ConversionService conversionService;
|
||||
|
||||
/**
|
||||
* Creates a new expression parser that uses a {@link DefaultConversionService} to perform type conversion.
|
||||
*/
|
||||
public BeanWrapperExpressionParser() {
|
||||
this.conversionService = new DefaultConversionService();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new expression parser that uses the specified conversion service for type conversion.
|
||||
* @param conversionService the conversion service to use
|
||||
*/
|
||||
public BeanWrapperExpressionParser(ConversionService conversionService) {
|
||||
this.conversionService = conversionService;
|
||||
}
|
||||
|
||||
/**
|
||||
* The conversion service to use to obtain {@link ConversionExecutor conversion executors} that will be adapted to
|
||||
|
||||
@@ -160,12 +160,4 @@ public class OgnlExpressionParserTests extends TestCase {
|
||||
Expression e = parser.parseExpression(exp, null);
|
||||
assertEquals(boolean.class, e.getValueType(bean));
|
||||
}
|
||||
|
||||
public void testSetComplexDateType() {
|
||||
String value = "2008-07-04";
|
||||
Expression e = parser.parseExpression("date", null);
|
||||
e.setValue(bean, value);
|
||||
assertEquals(1215144000000L, bean.getDate().getTime());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user