🧠 BOOLEAN_FROM Unit Tests - unit-test.logic.yaml🟢
- Contextual name: 🧠 unit-test.logic.yaml🟢
- ID:
/ce/unit-test/boolean-from/unit-test.logic.yaml - Tags:
Uses
Test Results 🟢
Generated at: 2025-10-18T12:02:44.021652094Z Open
| Result | Id | Condition Index | Condition Text | Runtime Error |
|---|---|---|---|---|
| 🟢 | Test-1 | ✔️ 199 | ✔️ unitTest(Test-1): 'true'.asBoolean() | ✔️ null |
| 🟢 | Test-2 | ✔️ 299 | ✔️ unitTest(Test-2): 'TRUE'.asBoolean() | ✔️ null |
| 🟢 | Test-3 | ✔️ 399 | ✔️ unitTest(Test-3): ' True '.asBoolean() | ✔️ null |
| 🟢 | Test-4 | ✔️ 499 | ✔️ unitTest(Test-4): not('false'.asBoolean()) | ✔️ null |
| 🟢 | Test-5 | ✔️ 599 | ✔️ unitTest(Test-5): not('any-text'.asBoolean()) | ✔️ null |
| 🟢 | Test-6 | ✔️ 601 | ✔️ ''.isEmpty() | ✔️ null |
| 🟢 | Test-7 | ✔️ 701 | ✔️ null.isEmpty() | ✔️ null |
| 🟢 | Test-8 | ✔️ 801 | ✔️ ''.isEmpty() | ✔️ null |
| 🟢 | Test-9 | ✔️ 999 | ✔️ unitTest(Test-9): '1'.asBoolean('1') | ✔️ null |
| 🟢 | Test-10 | ✔️ 1099 | ✔️ unitTest(Test-10): not('Off'.asBoolean('On')) | ✔️ null |
| 🟢 | Test-11 | ✔️ 1199 | ✔️ unitTest(Test-11): 'ENABLED'.asBoolean('Enabled') | ✔️ null |
Generation Bundle
| File | MD5 | |
|---|---|---|
| Open | /ce/unit-test/boolean-from/policy.yaml | 48668DF79ACE3DAA29FF2A355CDCDD4D |
| Open | /ce/unit-test/boolean-from/unit-test.logic.yaml | 17F48E6E2468FB3CD3917DE32E1030E5 |
Available Commands
repo-manager policies generate FULL /ce/unit-test/boolean-from/unit-test.logic.yaml
repo-manager policies generate DEBUG /ce/unit-test/boolean-from/unit-test.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/unit-test/boolean-from/unit-test.logic.yaml
repo-manager policies generate TESTS /ce/unit-test/boolean-from/unit-test.logic.yaml
# Execute tests
repo-manager policies test /ce/unit-test/boolean-from/unit-test.logic.yaml
Content
---
inputType: CA10__CaAwsInstance__c
conditions:
- status: COMPLIANT
currentStateMessage: Test-1
check:
UNIT_TEST:
id: Test-1
expected:
text: "unitTest(Test-1): 'true'.asBoolean()"
arg:
BOOLEAN_FROM:
arg:
TEXT: "true"
undeterminedIf:
isEmpty: "Should not happen"
- status: COMPLIANT
currentStateMessage: Test-2
check:
UNIT_TEST:
id: Test-2
expected:
text: "unitTest(Test-2): 'TRUE'.asBoolean()"
arg:
BOOLEAN_FROM:
arg:
TEXT: "TRUE"
undeterminedIf:
isEmpty: "Should not happen"
- status: COMPLIANT
currentStateMessage: Test-3
check:
UNIT_TEST:
id: Test-3
expected:
text: "unitTest(Test-3): ' True '.asBoolean()"
arg:
BOOLEAN_FROM:
arg:
TEXT: " True "
undeterminedIf:
isEmpty: "Should not happen"
- status: COMPLIANT
currentStateMessage: Test-4
check:
UNIT_TEST:
id: Test-4
expected:
text: "unitTest(Test-4): not('false'.asBoolean())"
arg:
NOT:
arg:
BOOLEAN_FROM:
arg:
TEXT: "false"
undeterminedIf:
isEmpty: "Should not happen"
- status: COMPLIANT
currentStateMessage: Test-5
check:
UNIT_TEST:
id: Test-5
expected:
text: "unitTest(Test-5): not('any-text'.asBoolean())"
arg:
NOT:
arg:
BOOLEAN_FROM:
arg:
TEXT: "any-text"
undeterminedIf:
isEmpty: "Should not happen"
- status: COMPLIANT
currentStateMessage: Test-6
check:
UNIT_TEST:
id: Test-6
expected:
status: UNDETERMINED
subIndex: 1
text: "''.isEmpty()"
arg:
BOOLEAN_FROM:
arg:
TEXT: ""
undeterminedIf:
isEmpty: "Empty text received"
- status: COMPLIANT
currentStateMessage: Test-7
check:
UNIT_TEST:
id: Test-7
expected:
status: UNDETERMINED
subIndex: 1
text: "null.isEmpty()"
arg:
BOOLEAN_FROM:
arg:
UNIT_TEST_NULL:
returnType: TEXT
undeterminedIf:
isEmpty: "Empty text received"
- status: COMPLIANT
currentStateMessage: Test-8
check:
UNIT_TEST:
id: Test-8
expected:
status: UNDETERMINED
subIndex: 1
text: "''.isEmpty()"
arg:
BOOLEAN_FROM:
arg:
TEXT: ""
trueValue: ""
undeterminedIf:
isEmpty: "Empty text received"
- status: COMPLIANT
currentStateMessage: Test-9
check:
UNIT_TEST:
id: Test-9
expected:
text: "unitTest(Test-9): '1'.asBoolean('1')"
arg:
BOOLEAN_FROM:
arg:
TEXT: "1"
trueValue: "1"
undeterminedIf:
isEmpty: "Should not happen"
- status: COMPLIANT
currentStateMessage: Test-10
check:
UNIT_TEST:
id: Test-10
expected:
text: "unitTest(Test-10): not('Off'.asBoolean('On'))"
arg:
NOT:
arg:
BOOLEAN_FROM:
arg:
TEXT: "Off"
trueValue: "On"
undeterminedIf:
isEmpty: "Should not happen"
- status: COMPLIANT
currentStateMessage: Test-11
check:
UNIT_TEST:
id: Test-11
expected:
text: "unitTest(Test-11): 'ENABLED'.asBoolean('Enabled')"
arg:
BOOLEAN_FROM:
arg:
TEXT: "ENABLED"
trueValue: "Enabled"
undeterminedIf:
isEmpty: "Should not happen"
otherwise:
status: INCOMPLIANT
currentStateMessage: Test Failed
remediationMessage: Developer Fix Required