Skip to content

Commit

Permalink
1150-boxed-conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
StrayAlien authored and baldimir committed Oct 19, 2023
1 parent 6b074ce commit 40c6ef2
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Contributed to DMN TCK by StrayAlien -->
<testCases xmlns="http://www.omg.org/spec/DMN/20160719/testcase"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=""
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<modelName>1150-boxed-conditional.dmn</modelName>

<testCase id="001">
<description>Will return 'then' expression result when if expr is true</description>
<resultNode name="decision001" type="decision">
<expected>
<value xsi:type="xsd:string">then</value>
</expected>
</resultNode>
</testCase>

<testCase id="002">
<description>Will return 'else' expression result when if expr is false</description>
<resultNode name="decision002" type="decision">
<expected>
<value xsi:type="xsd:string">else</value>
</expected>
</resultNode>
</testCase>

<testCase id="003">
<description>Will return 'null' when if expression is not boolean</description>
<resultNode name="decision003" type="decision" errorResult="true">
<expected>
<value xsi:nil="true"/>
</expected>
</resultNode>
</testCase>

</testCases>
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions namespace="http://www.montera.com.au/spec/DMN/1150-boxed-conditional"
name="1150-boxed-conditional"
id="_i9fboPUUEeesLuP4RHs4vA"
xmlns="https://www.omg.org/spec/DMN/20211108/MODEL/"
xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/"
xmlns:dmndi="https://www.omg.org/spec/DMN/20191111/DMNDI/"
xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<description>Boxed Conditional Expression</description>

<decision name="decision001" id="_decision001">
<variable name="decision001"/>
<conditional>
<if><literalExpression><text>true</text></literalExpression></if>
<then><literalExpression><text>"then"</text></literalExpression></then>
<else><literalExpression><text>"else"</text></literalExpression></else>
</conditional>
</decision>

<decision name="decision002" id="_decision002">
<variable name="decision002"/>
<conditional>
<if><literalExpression><text>false</text></literalExpression></if>
<then><literalExpression><text>"then"</text></literalExpression></then>
<else><literalExpression><text>"else"</text></literalExpression></else>
</conditional>
</decision>

<decision name="decision003" id="_decision003">
<variable name="decision003"/>
<conditional>
<if><literalExpression><text>"abc"</text></literalExpression></if>
<then><literalExpression><text>"then"</text></literalExpression></then>
<else><literalExpression><text>"else"</text></literalExpression></else>
</conditional>
</decision>

</definitions>

0 comments on commit 40c6ef2

Please sign in to comment.