AthiraHari77 commented on code in PR #6535:
URL:
https://github.com/apache/incubator-kie-drools/pull/6535#discussion_r2588198751
##########
kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/compiler/ItemDefinitionDependenciesTest.java:
##########
@@ -227,4 +230,66 @@ void circular3() {
assertThat(orderedList.subList(0, 2)).contains(fhirAge, fhirExtension);
assertThat(orderedList.subList(2, 3)).contains(fhirT1);
}
-}
+
+ @Test
+ void testTypeRefWhenPresent() {
+ QName expected = new QName("ns", "date");
+ ItemDefinition item = new TItemDefinition();
+ item.setTypeRef(expected);
+
+ QName result = retrieveTypeRef(item, TEST_NS, DMNVersion.V1_2);
+ assertThat(expected).isEqualTo(result);
+ }
+
+ @Test
+ void testTypeRefNull() {
+ ItemDefinition item = new TItemDefinition();
+
+ QName result = retrieveTypeRef(item, TEST_NS, DMNVersion.V1_2);
+ assertThat(result).isNull();
+ }
+
+ @Test
+ void testRetrieveTypeRefFromFunctionItem() {
+ ItemDefinition id = new TItemDefinition();
+ FunctionItem fi = new TFunctionItem();
+ QName type = new QName("ns", "date");
Review Comment:
Fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]