π§ AND Unit Tests - unit-test.logic.yaml π’
- Contextual name: π§ unit-test.logic.yaml π’
- ID:
/ce/unit-test/and/unit-test.logic.yaml
- Located in: π AND Unit Tests π’
Flagsβ
- π’ Logic test success
- π’ Logic with test data
- π’ Unit-test logic
Input Typeβ
Type | API Name | Extracts | Extract Files | Logic Files | |
---|---|---|---|---|---|
π | π AWS EC2 Instance | CA10__CaAwsInstance__c | 12 | 2 | 47 |
Usesβ
None
Test Results π’β
Generated at: 2025-07-03T01:27:58.994642519Z Open
Result | Id | Condition Index | Condition Text | Runtime Error |
---|---|---|---|---|
π’ | Test-1 | βοΈ 199 | βοΈ unitTest(Test-1): true | βοΈ null |
π’ | Test-2 | βοΈ 299 | βοΈ unitTest(Test-2): not(false) | βοΈ null |
π’ | Test-3 | βοΈ 399 | βοΈ unitTest(Test-3): not(false && false) | βοΈ null |
π’ | Test-4 | βοΈ 499 | βοΈ unitTest(Test-4): not(true && false) | βοΈ null |
π’ | Test-5 | βοΈ 599 | βοΈ unitTest(Test-5): not(false && true) | βοΈ null |
π’ | Test-6 | βοΈ 699 | βοΈ unitTest(Test-6): true && true | βοΈ null |
π’ | Test-7 | βοΈ 799 | βοΈ unitTest(Test-7): not(true && true && false) | βοΈ null |
π’ | Test-8 | βοΈ 899 | βοΈ unitTest(Test-8): not(false && error('Short-circuit evaluation: does not compute second argument')) | βοΈ null |
π’ | Test-9 | βοΈ 901 | βοΈ error('Short-circuit evaluation: compute second argument').throw() | βοΈ Short-circuit evaluation: compute second argument |
Generationβ
File | MD5 | |
---|---|---|
Open | /ce/unit-test/and/policy.yaml | CE65BADE101E4634663712661F2AD758 |
Open | /ce/unit-test/and/unit-test.logic.yaml | 8ACD378FED89B7C7E87AED3FAB96D6D4 |
Generate FULL scriptβ
java -jar repo-manager.jar policies generate FULL /ce/unit-test/and/unit-test.logic.yaml
Generate DEBUG scriptβ
java -jar repo-manager.jar policies generate DEBUG /ce/unit-test/and/unit-test.logic.yaml
Generate CAPTURE_TEST_DATA scriptβ
java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/unit-test/and/unit-test.logic.yaml
Generate TESTS scriptβ
java -jar repo-manager.jar policies generate TESTS /ce/unit-test/and/unit-test.logic.yaml
Execute testsβ
java -jar repo-manager.jar policies test /ce/unit-test/and/unit-test.logic.yaml
Contentβ
---
inputType: CA10__CaAwsInstance__c
conditions:
- status: COMPLIANT
currentStateMessage: Test-1
check:
UNIT_TEST:
id: Test-1
arg:
AND:
args:
- BOOLEAN: true
expected:
text: "unitTest(Test-1): true"
- status: COMPLIANT
currentStateMessage: Test-2
check:
UNIT_TEST:
id: Test-2
arg:
NOT:
arg:
AND:
args:
- BOOLEAN: false
expected:
text: "unitTest(Test-2): not(false)"
- status: COMPLIANT
currentStateMessage: Test-3
check:
UNIT_TEST:
id: Test-3
arg:
NOT:
arg:
AND:
args:
- BOOLEAN: false
- BOOLEAN: false
expected:
text: "unitTest(Test-3): not(false && false)"
- status: COMPLIANT
currentStateMessage: Test-4
check:
UNIT_TEST:
id: Test-4
arg:
NOT:
arg:
AND:
args:
- BOOLEAN: true
- BOOLEAN: false
expected:
text: "unitTest(Test-4): not(true && false)"
- status: COMPLIANT
currentStateMessage: Test-5
check:
UNIT_TEST:
id: Test-5
arg:
NOT:
arg:
AND:
args:
- BOOLEAN: false
- BOOLEAN: true
expected:
text: "unitTest(Test-5): not(false && true)"
- status: COMPLIANT
currentStateMessage: Test-6
check:
UNIT_TEST:
id: Test-6
arg:
AND:
args:
- BOOLEAN: true
- BOOLEAN: true
expected:
text: "unitTest(Test-6): true && true"
- status: COMPLIANT
currentStateMessage: Test-7
check:
UNIT_TEST:
id: Test-7
arg:
NOT:
arg:
AND:
args:
- BOOLEAN: true
- BOOLEAN: true
- BOOLEAN: false
expected:
text: "unitTest(Test-7): not(true && true && false)"
- status: COMPLIANT
currentStateMessage: Test-8
check:
UNIT_TEST:
id: Test-8
arg:
NOT:
arg:
AND:
args:
- BOOLEAN: false
- UNIT_TEST_RUNTIME_ERROR:
returnType: BOOLEAN
message: "Short-circuit evaluation: does not compute second argument"
expected:
text: "unitTest(Test-8): not(false && error('Short-circuit evaluation: does not compute second argument'))"
- status: COMPLIANT
currentStateMessage: Test-9
check:
UNIT_TEST:
id: Test-9
arg:
AND:
args:
- BOOLEAN: true
- UNIT_TEST_RUNTIME_ERROR:
returnType: BOOLEAN
message: "Short-circuit evaluation: compute second argument"
expected:
status: UNDETERMINED
subIndex: 1
text: "error('Short-circuit evaluation: compute second argument').throw()"
runtimeError: "Short-circuit evaluation: compute second argument"
otherwise:
status: INCOMPLIANT
currentStateMessage: Test Failed
remediationMessage: Developer Fix Required