yesamer commented on code in PR #6535:
URL:
https://github.com/apache/incubator-kie-drools/pull/6535#discussion_r2571218751
##########
kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/compiler/ItemDefinitionDependenciesTest.java:
##########
@@ -227,4 +230,53 @@ 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, DMNVersion.V1_2);
+ assertThat(expected).isEqualTo(result);
+ }
+
+ @Test
+ void testTypeRefNull() {
+ ItemDefinition item = new TItemDefinition();
+
+ QName result = retrieveTypeRef(item, DMNVersion.V1_2);
+ assertThat(result).isNull();
+ }
+
+ @Test
+ void testRetrieveTypeRef_dmnVersionNull() {
+ ItemDefinition item = new TItemDefinition();
+
+ QName result = retrieveTypeRef(item, null);
Review Comment:
@AthiraHari77 Nice catch!!
--
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]