diff --git a/dmn-core/src/main/java/com/gs/dmn/feel/synthesis/type/JavaTimeKotlinNativeTypeFactory.java b/dmn-core/src/main/java/com/gs/dmn/feel/synthesis/type/JavaTimeKotlinNativeTypeFactory.java index e4ce758ed..4d410a21f 100644 --- a/dmn-core/src/main/java/com/gs/dmn/feel/synthesis/type/JavaTimeKotlinNativeTypeFactory.java +++ b/dmn-core/src/main/java/com/gs/dmn/feel/synthesis/type/JavaTimeKotlinNativeTypeFactory.java @@ -38,7 +38,7 @@ public class JavaTimeKotlinNativeTypeFactory extends KotlinTypeFactory { FEEL_TYPE_TO_JAVA_TYPE.put(DATE.getName(), java.time.LocalDate.class.getName()); FEEL_TYPE_TO_JAVA_TYPE.put(STRING.getName(), String.class.getSimpleName()); FEEL_TYPE_TO_JAVA_TYPE.put(BOOLEAN.getName(), Boolean.class.getSimpleName()); - FEEL_TYPE_TO_JAVA_TYPE.put(NUMBER.getName(), java.math.BigDecimal.class.getName()); + FEEL_TYPE_TO_JAVA_TYPE.put(NUMBER.getName(), java.lang.Number.class.getName()); FEEL_TYPE_TO_JAVA_TYPE.put(ANY.getName(), "kotlin.Any"); FEEL_TYPE_TO_JAVA_TYPE.put(NULL.getName(), "kotlin.Any"); } @@ -53,7 +53,7 @@ public class JavaTimeKotlinNativeTypeFactory extends KotlinTypeFactory { FEEL_TYPE_TO_QUALIFIED_JAVA_TYPE.put(DATE.getName(), java.time.LocalDate.class.getName()); FEEL_TYPE_TO_QUALIFIED_JAVA_TYPE.put(STRING.getName(), String.class.getName()); FEEL_TYPE_TO_QUALIFIED_JAVA_TYPE.put(BOOLEAN.getName(), Boolean.class.getName()); - FEEL_TYPE_TO_QUALIFIED_JAVA_TYPE.put(NUMBER.getName(), java.math.BigDecimal.class.getName()); + FEEL_TYPE_TO_QUALIFIED_JAVA_TYPE.put(NUMBER.getName(), java.lang.Number.class.getName()); FEEL_TYPE_TO_QUALIFIED_JAVA_TYPE.put(ANY.getName(), "kotlin.Any"); FEEL_TYPE_TO_QUALIFIED_JAVA_TYPE.put(NULL.getName(), "kotlin.Any"); } diff --git a/dmn-core/src/main/java/com/gs/dmn/feel/synthesis/type/JavaTypeFactory.java b/dmn-core/src/main/java/com/gs/dmn/feel/synthesis/type/JavaTypeFactory.java index 694e359ea..a7f99f0fe 100644 --- a/dmn-core/src/main/java/com/gs/dmn/feel/synthesis/type/JavaTypeFactory.java +++ b/dmn-core/src/main/java/com/gs/dmn/feel/synthesis/type/JavaTypeFactory.java @@ -12,6 +12,8 @@ */ package com.gs.dmn.feel.synthesis.type; +import java.math.BigDecimal; + public abstract class JavaTypeFactory implements NativeTypeFactory { @Override public String nullableType(String type) { @@ -24,8 +26,12 @@ public String constructorOfGenericType(String typeName, String... typeParameters } @Override - public String javaClass(String className) { + public String classOf(String className) { return String.format("%s.class", className); } + @Override + public String getNativeNumberConcreteType() { + return BigDecimal.class.getName(); + } } diff --git a/dmn-core/src/main/java/com/gs/dmn/feel/synthesis/type/KotlinTypeFactory.java b/dmn-core/src/main/java/com/gs/dmn/feel/synthesis/type/KotlinTypeFactory.java index 238c37311..60c8b49b0 100644 --- a/dmn-core/src/main/java/com/gs/dmn/feel/synthesis/type/KotlinTypeFactory.java +++ b/dmn-core/src/main/java/com/gs/dmn/feel/synthesis/type/KotlinTypeFactory.java @@ -12,6 +12,7 @@ */ package com.gs.dmn.feel.synthesis.type; +import java.math.BigDecimal; import java.util.Arrays; public abstract class KotlinTypeFactory implements NativeTypeFactory { @@ -30,7 +31,12 @@ public String constructorOfGenericType(String typeName, String... typeParameters } @Override - public String javaClass(String className) { + public String classOf(String className) { return String.format("%s::class.java", className); } + + @Override + public String getNativeNumberConcreteType() { + return BigDecimal.class.getName(); + } } diff --git a/dmn-core/src/main/java/com/gs/dmn/feel/synthesis/type/NativeTypeFactory.java b/dmn-core/src/main/java/com/gs/dmn/feel/synthesis/type/NativeTypeFactory.java index 0e5f3d2c2..b29a67ccd 100644 --- a/dmn-core/src/main/java/com/gs/dmn/feel/synthesis/type/NativeTypeFactory.java +++ b/dmn-core/src/main/java/com/gs/dmn/feel/synthesis/type/NativeTypeFactory.java @@ -14,8 +14,6 @@ import com.gs.dmn.feel.analysis.semantics.type.*; -import java.math.BigDecimal; - public interface NativeTypeFactory { String toNativeType(String feelType); @@ -25,7 +23,7 @@ public interface NativeTypeFactory { String constructorOfGenericType(String typeName, String... typeParameters); - String javaClass(String type); + String classOf(String type); // // Types @@ -33,9 +31,7 @@ public interface NativeTypeFactory { default String getNativeNumberType() { return toNativeType(NumberType.NUMBER.getName()); } - default String getNativeNumberConcreteType() { - return BigDecimal.class.getName(); - } + String getNativeNumberConcreteType(); default String getNativeDateType() { return toNativeType(DateType.DATE.getName()); diff --git a/dmn-core/src/main/java/com/gs/dmn/feel/synthesis/type/PythonTypeFactory.java b/dmn-core/src/main/java/com/gs/dmn/feel/synthesis/type/PythonTypeFactory.java index e6f12e190..0cbc3e296 100644 --- a/dmn-core/src/main/java/com/gs/dmn/feel/synthesis/type/PythonTypeFactory.java +++ b/dmn-core/src/main/java/com/gs/dmn/feel/synthesis/type/PythonTypeFactory.java @@ -28,7 +28,12 @@ public String constructorOfGenericType(String typeName, String... typeParameters } @Override - public String javaClass(String className) { + public String classOf(String className) { return String.format("%s.__class__", className); } + + @Override + public String getNativeNumberConcreteType() { + return getNativeNumberType(); + } } diff --git a/dmn-core/src/main/java/com/gs/dmn/transformation/basic/BasicDMNToJavaTransformer.java b/dmn-core/src/main/java/com/gs/dmn/transformation/basic/BasicDMNToJavaTransformer.java index 9c521f85f..df1778053 100644 --- a/dmn-core/src/main/java/com/gs/dmn/transformation/basic/BasicDMNToJavaTransformer.java +++ b/dmn-core/src/main/java/com/gs/dmn/transformation/basic/BasicDMNToJavaTransformer.java @@ -2302,12 +2302,12 @@ public String getNativeDurationType() { @Override public String getDefaultIntegerValue() { - return this.nativeFactory.constructor(getNativeNumberType(), "\"0\""); + return this.nativeFactory.constructor(this.nativeTypeFactory.getNativeNumberConcreteType(), "\"0\""); } @Override public String getDefaultDecimalValue() { - return this.nativeFactory.constructor(getNativeNumberType(), "\"0.0\""); + return this.nativeFactory.constructor(this.nativeTypeFactory.getNativeNumberConcreteType(), "\"0.0\""); } @Override diff --git a/dmn-core/src/main/java/com/gs/dmn/transformation/basic/DMNExpressionToNativeTransformer.java b/dmn-core/src/main/java/com/gs/dmn/transformation/basic/DMNExpressionToNativeTransformer.java index 521b208d0..de8a0df8e 100644 --- a/dmn-core/src/main/java/com/gs/dmn/transformation/basic/DMNExpressionToNativeTransformer.java +++ b/dmn-core/src/main/java/com/gs/dmn/transformation/basic/DMNExpressionToNativeTransformer.java @@ -564,7 +564,7 @@ private String javaFunctionToNative(JavaFunctionInfo javaInfo, FunctionType func String javaInfoArg = this.dmnTransformer.constructor(this.dmnTransformer.javaFunctionInfoClassName(), javaInfoArgs); String returnType = this.dmnTransformer.toNativeType(functionType.getReturnType()); String className = this.nativeTypeFactory.constructorOfGenericType(this.dmnTransformer.javaExternalFunctionClassName(), returnType); - String javaClassOfReturnType = this.nativeTypeFactory.javaClass(returnType); + String javaClassOfReturnType = this.nativeTypeFactory.classOf(returnType); return this.dmnTransformer.constructor(className, String.format("%s, %s, %s", javaInfoArg, this.dmnTransformer.externalExecutorVariableName(), javaClassOfReturnType)); } diff --git a/dmn-core/src/test/java/com/gs/dmn/feel/synthesis/FEELToTripleNativeVisitorTest.java b/dmn-core/src/test/java/com/gs/dmn/feel/synthesis/FEELToTripleNativeVisitorTest.java index 8fe0593da..1a93a02ef 100644 --- a/dmn-core/src/test/java/com/gs/dmn/feel/synthesis/FEELToTripleNativeVisitorTest.java +++ b/dmn-core/src/test/java/com/gs/dmn/feel/synthesis/FEELToTripleNativeVisitorTest.java @@ -1,3 +1,15 @@ +/* + * Copyright 2016 Goldman Sachs. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ package com.gs.dmn.feel.synthesis; import com.gs.dmn.AbstractTest; diff --git a/dmn-core/src/test/java/com/gs/dmn/feel/synthesis/type/JavaNativeTypeFactoryTest.java b/dmn-core/src/test/java/com/gs/dmn/feel/synthesis/type/JavaNativeTypeFactoryTest.java new file mode 100644 index 000000000..050a70ece --- /dev/null +++ b/dmn-core/src/test/java/com/gs/dmn/feel/synthesis/type/JavaNativeTypeFactoryTest.java @@ -0,0 +1,80 @@ +/* + * Copyright 2016 Goldman Sachs. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.gs.dmn.feel.synthesis.type; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class JavaNativeTypeFactoryTest { + private final NativeTypeFactory typeFactory = new JavaTimeNativeTypeFactory(); + + @Test + public void testToNativeType() { + assertEquals("java.lang.Number", typeFactory.toNativeType("number")); + assertEquals("String", typeFactory.toNativeType("string")); + assertEquals("Boolean", typeFactory.toNativeType("boolean")); + } + + @Test + public void testToQualifiedNativeType() { + assertEquals("java.lang.Number", typeFactory.toQualifiedNativeType("number")); + assertEquals("java.lang.String", typeFactory.toQualifiedNativeType("string")); + assertEquals("java.lang.Boolean", typeFactory.toQualifiedNativeType("boolean")); + } + + @Test + public void testNullableType() { + assertEquals("A", typeFactory.nullableType("A")); + } + + @Test + public void testConstructorOfGenericType() { + assertEquals("A<>", typeFactory.constructorOfGenericType("A", "a", "b")); + } + + @Test + public void testClassOf() { + assertEquals("A.class", typeFactory.classOf("A")); + } + + @Test + public void testGetNativeNumberType() { + assertEquals("java.lang.Number", typeFactory.getNativeNumberType()); + } + + @Test + public void testGetNativeNumberConcreteType() { + assertEquals("java.math.BigDecimal", typeFactory.getNativeNumberConcreteType()); + } + + @Test + public void testGetNativeDateType() { + assertEquals("java.time.LocalDate", typeFactory.getNativeDateType()); + } + + @Test + public void testGetNativeTimeType() { + assertEquals("java.time.temporal.TemporalAccessor", typeFactory.getNativeTimeType()); + } + + @Test + public void testGetNativeDateAndTimeType() { + assertEquals("java.time.temporal.TemporalAccessor", typeFactory.getNativeDateAndTimeType()); + } + + @Test + public void testGetNativeDurationType() { + assertEquals("java.time.temporal.TemporalAmount", typeFactory.getNativeDurationType()); + } +} \ No newline at end of file diff --git a/dmn-core/src/test/java/com/gs/dmn/feel/synthesis/type/KotlinNativeTypeFactoryTest.java b/dmn-core/src/test/java/com/gs/dmn/feel/synthesis/type/KotlinNativeTypeFactoryTest.java new file mode 100644 index 000000000..36baf26ed --- /dev/null +++ b/dmn-core/src/test/java/com/gs/dmn/feel/synthesis/type/KotlinNativeTypeFactoryTest.java @@ -0,0 +1,77 @@ +/* + * Copyright 2016 Goldman Sachs. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.gs.dmn.feel.synthesis.type; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class KotlinNativeTypeFactoryTest { + private final NativeTypeFactory typeFactory = new JavaTimeKotlinNativeTypeFactory(); + + @Test + public void testToNativeType() { + assertEquals("java.lang.Number", typeFactory.toNativeType("number")); + assertEquals("String", typeFactory.toNativeType("string")); + } + + @Test + public void testToQualifiedNativeType() { + assertEquals("java.lang.Number", typeFactory.toQualifiedNativeType("number")); + } + + @Test + public void testNullableType() { + assertEquals("A?", typeFactory.nullableType("A")); + } + + @Test + public void testConstructorOfGenericType() { + assertEquals("A", typeFactory.constructorOfGenericType("A", "a", "b")); + } + + @Test + public void testClassOf() { + assertEquals("A::class.java", typeFactory.classOf("A")); + } + + @Test + public void testGetNativeNumberType() { + assertEquals("java.lang.Number", typeFactory.getNativeNumberType()); + } + + @Test + public void testGetNativeNumberConcreteType() { + assertEquals("java.math.BigDecimal", typeFactory.getNativeNumberConcreteType()); + } + + @Test + public void testGetNativeDateType() { + assertEquals("java.time.LocalDate", typeFactory.getNativeDateType()); + } + + @Test + public void testGetNativeTimeType() { + assertEquals("java.time.temporal.TemporalAccessor", typeFactory.getNativeTimeType()); + } + + @Test + public void testGetNativeDateAndTimeType() { + assertEquals("java.time.temporal.TemporalAccessor", typeFactory.getNativeDateAndTimeType()); + } + + @Test + public void testGetNativeDurationType() { + assertEquals("java.time.temporal.TemporalAmount", typeFactory.getNativeDurationType()); + } +} \ No newline at end of file diff --git a/dmn-core/src/test/java/com/gs/dmn/feel/synthesis/type/PythonNativeTypeFactoryTest.java b/dmn-core/src/test/java/com/gs/dmn/feel/synthesis/type/PythonNativeTypeFactoryTest.java new file mode 100644 index 000000000..0ee7a02c9 --- /dev/null +++ b/dmn-core/src/test/java/com/gs/dmn/feel/synthesis/type/PythonNativeTypeFactoryTest.java @@ -0,0 +1,80 @@ +/* + * Copyright 2016 Goldman Sachs. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.gs.dmn.feel.synthesis.type; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class PythonNativeTypeFactoryTest { + private final NativeTypeFactory typeFactory = new StandardNativeTypeToPythonFactory(); + + @Test + public void testToNativeType() { + assertEquals("decimal.Decimal", typeFactory.toNativeType("number")); + assertEquals("str", typeFactory.toNativeType("string")); + assertEquals("bool", typeFactory.toNativeType("boolean")); + } + + @Test + public void testToQualifiedNativeType() { + assertEquals("decimal.Decimal", typeFactory.toQualifiedNativeType("number")); + assertEquals("str", typeFactory.toQualifiedNativeType("string")); + assertEquals("bool", typeFactory.toQualifiedNativeType("boolean")); + } + + @Test + public void testNullableType() { + assertEquals("typing.Optional[A]", typeFactory.nullableType("A")); + } + + @Test + public void testConstructorOfGenericType() { + assertEquals("A", typeFactory.constructorOfGenericType("A", "a", "b")); + } + + @Test + public void testClassOf() { + assertEquals("A.__class__", typeFactory.classOf("A")); + } + + @Test + public void testGetNativeNumberType() { + assertEquals("decimal.Decimal", typeFactory.getNativeNumberType()); + } + + @Test + public void testGetNativeNumberConcreteType() { + assertEquals("decimal.Decimal", typeFactory.getNativeNumberConcreteType()); + } + + @Test + public void testGetNativeDateType() { + assertEquals("datetime.date", typeFactory.getNativeDateType()); + } + + @Test + public void testGetNativeTimeType() { + assertEquals("datetime.time", typeFactory.getNativeTimeType()); + } + + @Test + public void testGetNativeDateAndTimeType() { + assertEquals("datetime.datetime", typeFactory.getNativeDateAndTimeType()); + } + + @Test + public void testGetNativeDurationType() { + assertEquals("datetime.timedelta", typeFactory.getNativeDurationType()); + } +} \ No newline at end of file diff --git a/dmn-core/src/test/java/com/gs/dmn/transformation/basic/BasicDMNToJavaTransformerTest.java b/dmn-core/src/test/java/com/gs/dmn/transformation/basic/BasicDMNToJavaTransformerTest.java index 5ce118436..262dafe7e 100644 --- a/dmn-core/src/test/java/com/gs/dmn/transformation/basic/BasicDMNToJavaTransformerTest.java +++ b/dmn-core/src/test/java/com/gs/dmn/transformation/basic/BasicDMNToJavaTransformerTest.java @@ -17,7 +17,7 @@ import com.gs.dmn.ast.TDecision; import com.gs.dmn.ast.TDefinitions; import com.gs.dmn.dialect.DMNDialectDefinition; -import com.gs.dmn.dialect.StandardDMNDialectDefinition; +import com.gs.dmn.dialect.JavaTimeDMNDialectDefinition; import com.gs.dmn.serialization.DMNSerializer; import com.gs.dmn.tck.ast.TestCases; import com.gs.dmn.transformation.InputParameters; @@ -25,10 +25,10 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import javax.xml.datatype.Duration; -import javax.xml.datatype.XMLGregorianCalendar; import java.io.File; -import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.temporal.TemporalAccessor; +import java.time.temporal.TemporalAmount; import java.util.Arrays; import java.util.List; @@ -36,7 +36,7 @@ import static org.junit.jupiter.api.Assertions.assertNull; public class BasicDMNToJavaTransformerTest extends AbstractTest { - private final DMNDialectDefinition dialectDefinition = new StandardDMNDialectDefinition(); + private final DMNDialectDefinition dialectDefinition = new JavaTimeDMNDialectDefinition(); private final DMNSerializer serializer = this.dialectDefinition.createDMNSerializer(LOGGER, new InputParameters(makeInputParametersMap())); private BasicDMNToJavaTransformer dmnTransformer; private String href; @@ -94,22 +94,22 @@ public void testEmptyAnnotation() { public void testAnnotationWithOneString() { TDecision decision = this.dmnTransformer.getDMNModelRepository().findDecisionByRef(null, this.href); assertEquals(Arrays.asList("string(\"plain text\")"), this.dmnTransformer.annotations(decision, Arrays.asList("string(\"plain text\")"))); - assertEquals(Arrays.asList("string(((java.math.BigDecimal)(requestedProduct != null ? requestedProduct.getTerm() : null)))"), this.dmnTransformer.annotations(decision, Arrays.asList("string(RequestedProduct.Term)"))); + assertEquals(Arrays.asList("string(((java.lang.Number)(requestedProduct != null ? requestedProduct.getTerm() : null)))"), this.dmnTransformer.annotations(decision, Arrays.asList("string(RequestedProduct.Term)"))); assertEquals(Arrays.asList("string(\"\")"), this.dmnTransformer.annotations(decision,Arrays.asList( "string(\"\")"))); } @Test public void testAnnotationWithExpression() { TDecision decision = this.dmnTransformer.getDMNModelRepository().findDecisionByRef(null, this.href); - assertEquals(Arrays.asList("string(numericAdd(((java.math.BigDecimal)(requestedProduct != null ? requestedProduct.getRate() : null)), number(\"2\")))"), this.dmnTransformer.annotations(decision, Arrays.asList("string(RequestedProduct.Rate + 2)"))); + assertEquals(Arrays.asList("string(numericAdd(((java.lang.Number)(requestedProduct != null ? requestedProduct.getRate() : null)), number(\"2\")))"), this.dmnTransformer.annotations(decision, Arrays.asList("string(RequestedProduct.Rate + 2)"))); } @Test public void testAnnotationWithSeveralStrings() { TDecision decision = this.dmnTransformer.getDMNModelRepository().findDecisionByRef(null, this.href); List expected = Arrays.asList( - "stringAdd(stringAdd(stringAdd(stringAdd(string(\"Rate is \"), string(((java.math.BigDecimal)(requestedProduct != null ? requestedProduct.getRate() : null)))), " + - "string(\". And term is \")), string(((java.math.BigDecimal)(requestedProduct != null ? requestedProduct.getTerm() : null)))), string(\"!\"))"); + "stringAdd(stringAdd(stringAdd(stringAdd(string(\"Rate is \"), string(((java.lang.Number)(requestedProduct != null ? requestedProduct.getRate() : null)))), " + + "string(\". And term is \")), string(((java.lang.Number)(requestedProduct != null ? requestedProduct.getTerm() : null)))), string(\"!\"))"); assertEquals(expected, this.dmnTransformer.annotations(decision, Arrays.asList("string(\"Rate is \") + string(RequestedProduct.Rate) + string(\". And term is \") + string(RequestedProduct.Term) + string(\"!\")"))); assertEquals(Arrays.asList("asList(string(\"\"), string(\"\"), string(\"\"))"), this.dmnTransformer.annotations(decision, Arrays.asList("[string(\"\"), string(\"\"), string(\"\")]"))); } @@ -141,6 +141,17 @@ public void testJavaModelName() { assertEquals("literal_arithmetic", this.dmnTransformer.javaModelName("literal - arithmetic")); } + @Test + public void testDefaultValues() { + assertEquals("new java.math.BigDecimal(\"0\")", this.dmnTransformer.getDefaultIntegerValue()); + assertEquals("new java.math.BigDecimal(\"0.0\")", this.dmnTransformer.getDefaultDecimalValue()); + assertEquals("Boolean.FALSE", this.dmnTransformer.getDefaultBooleanValue()); + assertEquals("null", this.dmnTransformer.getDefaultStringValue()); + assertEquals("null", this.dmnTransformer.getDefaultDateValue()); + assertEquals("null", this.dmnTransformer.getDefaultTimeValue()); + assertEquals("null", this.dmnTransformer.getDefaultDateAndTimeValue()); + } + private DMNModelRepository readDMN(String pathName) { File input = new File(resource(pathName)); TDefinitions definitions = this.serializer.readModel(input);