-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b01a742
commit b91b4c5
Showing
67 changed files
with
1,727 additions
and
0 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
TestCases/compliance-level-3/1158-noname-imports/1158-noname-imports-001-A.dmn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<definitions namespace="http://www.montera.com.au/spec/DMN/1158-noname-imports-001-A" | ||
name="1158-noname-imports-001-A" | ||
id="_i9fboPUUEeesLuP4RHs4vA" | ||
xmlns="https://www.omg.org/spec/DMN/20230324/MODEL/" | ||
> | ||
<import namespace="http://www.montera.com.au/spec/DMN/1158-noname-imports-001-B" | ||
name="" | ||
importType="https://www.omg.org/spec/DMN/20230324/MODEL/" | ||
/> | ||
|
||
<!-- references an informationRequirement from an import --> | ||
<decision name="decision001" id="_decision001"> | ||
<variable name="decision001"/> | ||
<informationRequirement> | ||
<requiredDecision href="#_model_b_decision001"/> | ||
</informationRequirement> | ||
<literalExpression> | ||
<text>model_b_decision001</text> | ||
</literalExpression> | ||
</decision> | ||
|
||
<!-- references an knowledgeRequirement from an import --> | ||
<decision name="decision002" id="_decision002"> | ||
<variable name="decision002"/> | ||
<knowledgeRequirement> | ||
<requiredKnowledge href="#_model_b_bkm001"/> | ||
</knowledgeRequirement> | ||
<literalExpression> | ||
<text>model_b_bkm001()</text> | ||
</literalExpression> | ||
</decision> | ||
|
||
<!-- references an inputData from an import --> | ||
<decision name="decision003" id="_decision003"> | ||
<variable name="decision003"/> | ||
<informationRequirement> | ||
<requiredInput href="#_model_b_input001"/> | ||
</informationRequirement> | ||
<literalExpression> | ||
<text>model_b_input001</text> | ||
</literalExpression> | ||
</decision> | ||
|
||
<!-- uses an imported "string" typeRef - two tests will provide a string and a number | ||
as input to assert the correct type is being used (we'll see a null for a number value) --> | ||
<decision name="decision004" id="_decision004"> | ||
<variable name="decision004" typeRef="typeRefA"/> | ||
<informationRequirement> | ||
<requiredInput href="#_model_b_input001"/> | ||
</informationRequirement> | ||
<literalExpression> | ||
<text>model_b_input001</text> | ||
</literalExpression> | ||
</decision> | ||
|
||
|
||
</definitions> | ||
|
35 changes: 35 additions & 0 deletions
35
TestCases/compliance-level-3/1158-noname-imports/1158-noname-imports-001-B.dmn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<definitions namespace="http://www.montera.com.au/spec/DMN/1158-noname-imports-001-B" | ||
name="1158-noname-imports-001-B" | ||
id="_i9fboPUUEeesLuP4RHs4vA" | ||
xmlns="https://www.omg.org/spec/DMN/20230324/MODEL/" | ||
> | ||
<itemDefinition name="typeRefA"> | ||
<typeRef>string</typeRef> | ||
</itemDefinition> | ||
|
||
<inputData name="model_b_input001" id="_model_b_input001"> | ||
<variable name="model_b_input001" typeRef="Any"/> | ||
</inputData> | ||
|
||
<!-- decision just returns its own name --> | ||
<decision name="model_b_decision001" id="_model_b_decision001"> | ||
<variable name="model_b_decision001"/> | ||
<literalExpression> | ||
<text>"model_b_decision001"</text> | ||
</literalExpression> | ||
</decision> | ||
|
||
<!-- BKM just returns its own name --> | ||
<businessKnowledgeModel name="model_b_bkm001" id="_model_b_bkm001"> | ||
<variable name="model_b_bkm001"/> | ||
<encapsulatedLogic> | ||
<literalExpression> | ||
<text>"model_b_bkm001"</text> | ||
</literalExpression> | ||
</encapsulatedLogic> | ||
</businessKnowledgeModel> | ||
|
||
|
||
</definitions> | ||
|
68 changes: 68 additions & 0 deletions
68
TestCases/compliance-level-3/1158-noname-imports/1158-noname-imports-001-test.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<?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>1158-noname-imports-001-A.dmn</modelName> | ||
|
||
<!-- model A uses a number of no-name imports from model B --> | ||
|
||
<testCase id="001"> | ||
<description>will import a decision</description> | ||
<resultNode name="decision001" type="decision"> | ||
<expected> | ||
<value xsi:type="xsd:string">model_b_decision001</value> | ||
</expected> | ||
</resultNode> | ||
</testCase> | ||
|
||
<testCase id="002"> | ||
<description>will import a BKM</description> | ||
<resultNode name="decision002" type="decision"> | ||
<expected> | ||
<value xsi:type="xsd:string">model_b_bkm001</value> | ||
</expected> | ||
</resultNode> | ||
</testCase> | ||
|
||
<testCase id="003"> | ||
<description>will import an inputData</description> | ||
<inputNode name="model_b_input001"> | ||
<value xsi:type="xsd:string">model_b_input001</value> | ||
</inputNode> | ||
<resultNode name="decision003" type="decision"> | ||
<expected> | ||
<value xsi:type="xsd:string">model_b_input001</value> | ||
</expected> | ||
</resultNode> | ||
</testCase> | ||
|
||
<testCase id="004"> | ||
<!-- imported typeRef is a string, we test a string against it --> | ||
<description>will import a typeRef</description> | ||
<inputNode name="model_b_input001"> | ||
<value xsi:type="xsd:string">a string</value> | ||
</inputNode> | ||
<resultNode name="decision004" type="decision"> | ||
<expected> | ||
<value xsi:type="xsd:string">a string</value> | ||
</expected> | ||
</resultNode> | ||
</testCase> | ||
|
||
<testCase id="004_a"> | ||
<!-- imported typeRef is a string, we test a number against it --> | ||
<description>will import a typeRef</description> | ||
<inputNode name="model_b_input001"> | ||
<value xsi:type="xsd:decimal">1234</value> | ||
</inputNode> | ||
<resultNode name="decision004" type="decision"> | ||
<expected> | ||
<value xsi:nil="true"/> | ||
</expected> | ||
</resultNode> | ||
</testCase> | ||
|
||
|
||
</testCases> |
59 changes: 59 additions & 0 deletions
59
TestCases/compliance-level-3/1158-noname-imports/1158-noname-imports-002-A.dmn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<definitions namespace="http://www.montera.com.au/spec/DMN/1158-noname-imports-002-A" | ||
name="1158-noname-imports-002-A" | ||
id="_i9fboPUUEeesLuP4RHs4vA" | ||
xmlns="https://www.omg.org/spec/DMN/20230324/MODEL/" | ||
> | ||
<import namespace="http://www.montera.com.au/spec/DMN/1158-noname-imports-002-B" | ||
name="" | ||
importType="https://www.omg.org/spec/DMN/20230324/MODEL/" | ||
/> | ||
|
||
<!-- references an informationRequirement from an import --> | ||
<decision name="decision001" id="_decision001"> | ||
<variable name="decision001"/> | ||
<informationRequirement> | ||
<requiredDecision href="#_model_a_decision001"/> | ||
</informationRequirement> | ||
<literalExpression> | ||
<text>model_a_decision001</text> | ||
</literalExpression> | ||
</decision> | ||
|
||
<!-- references an knowledgeRequirement from an import --> | ||
<decision name="decision002" id="_decision002"> | ||
<variable name="decision002"/> | ||
<knowledgeRequirement> | ||
<requiredKnowledge href="#_model_a_bkm001"/> | ||
</knowledgeRequirement> | ||
<literalExpression> | ||
<text>model_a_bkm001()</text> | ||
</literalExpression> | ||
</decision> | ||
|
||
<!-- references an inputData from an import --> | ||
<decision name="decision003" id="_decision003"> | ||
<variable name="decision003"/> | ||
<informationRequirement> | ||
<requiredInput href="#_model_a_input001"/> | ||
</informationRequirement> | ||
<literalExpression> | ||
<text>model_a_input001</text> | ||
</literalExpression> | ||
</decision> | ||
|
||
<!-- uses an imported "string" typeRef - two tests will provide a string and a number | ||
as input to assert the type is being used (we'll see a null for a number value) --> | ||
<decision name="decision004" id="_decision004"> | ||
<variable name="decision004" typeRef="typeRefA"/> | ||
<informationRequirement> | ||
<requiredInput href="#_model_a_input001"/> | ||
</informationRequirement> | ||
<literalExpression> | ||
<text>model_a_input001</text> | ||
</literalExpression> | ||
</decision> | ||
|
||
|
||
</definitions> | ||
|
15 changes: 15 additions & 0 deletions
15
TestCases/compliance-level-3/1158-noname-imports/1158-noname-imports-002-B.dmn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<definitions namespace="http://www.montera.com.au/spec/DMN/1158-noname-imports-002-B" | ||
name="1158-noname-imports-002-B" | ||
id="_i9fboPUUEeesLuP4RHs4vA" | ||
xmlns="https://www.omg.org/spec/DMN/20230324/MODEL/" | ||
> | ||
<!-- does nothing but effectively import, then re-export everything in model C --> | ||
|
||
<import namespace="http://www.montera.com.au/spec/DMN/1158-noname-imports-002-C" | ||
name="" | ||
importType="https://www.omg.org/spec/DMN/20230324/MODEL/" | ||
/> | ||
|
||
</definitions> | ||
|
35 changes: 35 additions & 0 deletions
35
TestCases/compliance-level-3/1158-noname-imports/1158-noname-imports-002-C.dmn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<definitions namespace="http://www.montera.com.au/spec/DMN/1158-noname-imports-002-C" | ||
name="1158-noname-imports-002-C" | ||
id="_i9fboPUUEeesLuP4RHs4vA" | ||
xmlns="https://www.omg.org/spec/DMN/20230324/MODEL/" | ||
> | ||
<itemDefinition name="typeRefA"> | ||
<typeRef>string</typeRef> | ||
</itemDefinition> | ||
|
||
<inputData name="model_a_input001" id="_model_a_input001"> | ||
<variable name="model_a_input001" typeRef="Any"/> | ||
</inputData> | ||
|
||
<!-- decision just returns its own name --> | ||
<decision name="model_a_decision001" id="_model_a_decision001"> | ||
<variable name="model_a_decision001"/> | ||
<literalExpression> | ||
<text>"model_a_decision001"</text> | ||
</literalExpression> | ||
</decision> | ||
|
||
<!-- BKM just returns its own name --> | ||
<businessKnowledgeModel name="model_a_bkm001" id="_model_a_bkm001"> | ||
<variable name="model_a_bkm001"/> | ||
<encapsulatedLogic> | ||
<literalExpression> | ||
<text>"model_a_bkm001"</text> | ||
</literalExpression> | ||
</encapsulatedLogic> | ||
</businessKnowledgeModel> | ||
|
||
|
||
</definitions> | ||
|
73 changes: 73 additions & 0 deletions
73
TestCases/compliance-level-3/1158-noname-imports/1158-noname-imports-002-test.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<?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>1158-noname-imports-002-A.dmn</modelName> | ||
|
||
<!-- asserting that imports are recursive in that no-name imports of no-name imports | ||
are also considered part of the current model namespace. Here, the model A imports | ||
model B, which subsequently imports stuff from model C. The things in C | ||
are used in A. --> | ||
|
||
<!-- Effectively, Model B imports model C then 'exports' it all again --> | ||
|
||
<testCase id="001"> | ||
<description>will import a decision</description> | ||
<resultNode name="decision001" type="decision"> | ||
<expected> | ||
<value xsi:type="xsd:string">model_a_decision001</value> | ||
</expected> | ||
</resultNode> | ||
</testCase> | ||
|
||
<testCase id="002"> | ||
<description>will import a BKM</description> | ||
<resultNode name="decision002" type="decision"> | ||
<expected> | ||
<value xsi:type="xsd:string">model_a_bkm001</value> | ||
</expected> | ||
</resultNode> | ||
</testCase> | ||
|
||
<testCase id="003"> | ||
<description>will import an inputData</description> | ||
<inputNode name="model_a_input001"> | ||
<value xsi:type="xsd:string">model_a_input001</value> | ||
</inputNode> | ||
<resultNode name="decision003" type="decision"> | ||
<expected> | ||
<value xsi:type="xsd:string">model_a_input001</value> | ||
</expected> | ||
</resultNode> | ||
</testCase> | ||
|
||
<testCase id="004"> | ||
<!-- imported typeRef is a string, we test a string against it --> | ||
<description>will import a typeRef</description> | ||
<inputNode name="model_a_input001"> | ||
<value xsi:type="xsd:string">a string</value> | ||
</inputNode> | ||
<resultNode name="decision004" type="decision"> | ||
<expected> | ||
<value xsi:type="xsd:string">a string</value> | ||
</expected> | ||
</resultNode> | ||
</testCase> | ||
|
||
<testCase id="004_a"> | ||
<!-- imported typeRef is a string, we test a number against it --> | ||
<description>will import a typeRef</description> | ||
<inputNode name="model_a_input001"> | ||
<value xsi:type="xsd:decimal">1234</value> | ||
</inputNode> | ||
<resultNode name="decision004" type="decision"> | ||
<expected> | ||
<value xsi:nil="true"/> | ||
</expected> | ||
</resultNode> | ||
</testCase> | ||
|
||
|
||
</testCases> |
Oops, something went wrong.