Skip to main content

🧠 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​

Input Type​

TypeAPI NameExtractsExtract FilesLogic Files
πŸ”’πŸ“• AWS EC2 InstanceCA10__CaAwsInstance__c12244

Uses​

Test Results πŸŸ’β€‹

Generated at: 2025-04-24T23:47:42.573770337Z Open

ResultIdCondition IndexCondition TextRuntime 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​

FileMD5
Open/ce/unit-test/and/policy.yamlCE65BADE101E4634663712661F2AD758
Open/ce/unit-test/and/unit-test.logic.yaml8A8D6AE25167B5DDB8B68A2503EDFA01
Open/ce/unit-test/and/test-data.json500446587F14BDA72A49D8FB5421A6E3

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​

Open File

---
inputType: CA10__CaAwsInstance__c
testData:
- file: test-data.json
conditions:
- status: COMPLIANT
currentStateMessage: Test-1
check:
UNIT_TEST:
id: Test-1
arg:
AND:
args:
- BOOLEAN: true
- status: COMPLIANT
currentStateMessage: Test-2
check:
UNIT_TEST:
id: Test-2
arg:
NOT:
arg:
AND:
args:
- BOOLEAN: false
- status: COMPLIANT
currentStateMessage: Test-3
check:
UNIT_TEST:
id: Test-3
arg:
NOT:
arg:
AND:
args:
- BOOLEAN: false
- BOOLEAN: false
- status: COMPLIANT
currentStateMessage: Test-4
check:
UNIT_TEST:
id: Test-4
arg:
NOT:
arg:
AND:
args:
- BOOLEAN: true
- BOOLEAN: false
- status: COMPLIANT
currentStateMessage: Test-5
check:
UNIT_TEST:
id: Test-5
arg:
NOT:
arg:
AND:
args:
- BOOLEAN: false
- BOOLEAN: true
- status: COMPLIANT
currentStateMessage: Test-6
check:
UNIT_TEST:
id: Test-6
arg:
AND:
args:
- BOOLEAN: true
- BOOLEAN: true
- status: COMPLIANT
currentStateMessage: Test-7
check:
UNIT_TEST:
id: Test-7
arg:
NOT:
arg:
AND:
args:
- BOOLEAN: true
- BOOLEAN: true
- BOOLEAN: 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"
- 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"
otherwise:
status: INCOMPLIANT
currentStateMessage: Test Failed
remediationMessage: Developer Fix Required