From 1236f27d918932f9454f21e118d5eb35077292a3 Mon Sep 17 00:00:00 2001 From: James Ahlborn Date: Thu, 6 Sep 2018 02:28:08 +0000 Subject: refactor support for working with Value instances git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@1192 f203690c-595d-4dc9-a70b-905162fa7fd2 --- .../com/healthmarketscience/jackcess/PropertyExpressionTest.java | 4 ++-- .../jackcess/impl/expr/ExpressionatorTest.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/test') diff --git a/src/test/java/com/healthmarketscience/jackcess/PropertyExpressionTest.java b/src/test/java/com/healthmarketscience/jackcess/PropertyExpressionTest.java index b73496f..e5d7295 100644 --- a/src/test/java/com/healthmarketscience/jackcess/PropertyExpressionTest.java +++ b/src/test/java/com/healthmarketscience/jackcess/PropertyExpressionTest.java @@ -26,9 +26,9 @@ import com.healthmarketscience.jackcess.expr.Function; import com.healthmarketscience.jackcess.expr.FunctionLookup; import com.healthmarketscience.jackcess.expr.TemporalConfig; import com.healthmarketscience.jackcess.expr.Value; -import com.healthmarketscience.jackcess.impl.expr.BuiltinOperators; import com.healthmarketscience.jackcess.impl.expr.DefaultFunctions; import com.healthmarketscience.jackcess.impl.expr.FunctionSupport; +import com.healthmarketscience.jackcess.impl.expr.ValueSupport; import junit.framework.TestCase; import static com.healthmarketscience.jackcess.Database.*; @@ -354,7 +354,7 @@ public class PropertyExpressionTest extends TestCase @Override protected Value eval0(EvalContext ctx) { Object val = ctx.get("someKey"); - return BuiltinOperators.toValue("FOO_" + val); + return ValueSupport.toValue("FOO_" + val); } }; } diff --git a/src/test/java/com/healthmarketscience/jackcess/impl/expr/ExpressionatorTest.java b/src/test/java/com/healthmarketscience/jackcess/impl/expr/ExpressionatorTest.java index 8e077b0..188172d 100644 --- a/src/test/java/com/healthmarketscience/jackcess/impl/expr/ExpressionatorTest.java +++ b/src/test/java/com/healthmarketscience/jackcess/impl/expr/ExpressionatorTest.java @@ -429,12 +429,12 @@ public class ExpressionatorTest extends TestCase TestContext tc = new TestContext() { @Override public Value getThisColumnValue() { - return BuiltinOperators.toValue(23.0); + return ValueSupport.toValue(23.0); } @Override public Value getIdentifierValue(Identifier identifier) { - return BuiltinOperators.toValue(23.0); + return ValueSupport.toValue(23.0); } }; @@ -536,7 +536,7 @@ public class ExpressionatorTest extends TestCase } private static Boolean evalCondition(String exprStr, String thisVal) { - TestContext tc = new TestContext(BuiltinOperators.toValue(thisVal)); + TestContext tc = new TestContext(ValueSupport.toValue(thisVal)); Expression expr = Expressionator.parse( Expressionator.Type.FIELD_VALIDATOR, exprStr, null, tc); return (Boolean)expr.eval(tc); @@ -552,7 +552,7 @@ public class ExpressionatorTest extends TestCase } static BigDecimal toBD(BigDecimal bd) { - return BuiltinOperators.normalize(bd); + return ValueSupport.normalize(bd); } private static class TestContext -- cgit v1.2.3