🧠 GREATER_THAN Unit Tests - unit-test.logic.yaml🟢
- Contextual name: 🧠 unit-test.logic.yaml🟢
- ID:
/ce/unit-test/greater-than/unit-test.logic.yaml - Tags:
Uses
Test Results 🟢
Generated at: 2025-10-30T16:53:20.767433766Z Open
| Result | Id | Condition Index | Condition Text | Runtime Error |
|---|---|---|---|---|
| 🟢 | Simple-1 | ✔️ 199 | ✔️ unitTest(Simple-1): not(number(0.0) > number(1.0)) | ✔️ null |
| 🟢 | Simple-2 | ✔️ 299 | ✔️ unitTest(Simple-2): number(1.0) > number(0.0) | ✔️ null |
| 🟢 | Simple-3 | ✔️ 399 | ✔️ unitTest(Simple-3): not(number(1.0) > number(1.0)) | ✔️ null |
| 🟢 | Simple-4 | ✔️ 499 | ✔️ unitTest(Simple-4): number(1.0000000001) > number(1.0) | ✔️ null |
| 🟢 | Precision-1 | ✔️ 599 | ✔️ unitTest(Precision-1): number(1.111111111222224E9) > number(1.111111111222223E9) | ✔️ null |
| 🟢 | Precision-2 | ✔️ 699 | ✔️ unitTest(Precision-2): number(1.1111111112222235E9) > number(1.1111111112222233E9) | ✔️ null |
| 🟢 | Precision-3 | ✔️ 799 | ✔️ unitTest(Precision-3): not(number(1.1111111112222235E9) > number(1.1111111112222235E9)) | ✔️ null |
| 🟢 | Null-1 | ✔️ 899 | ✔️ unitTest(Null-1): not(null > null) | ✔️ null |
| 🟢 | Null-2 | ✔️ 999 | ✔️ unitTest(Null-2): not(number(-1.0) > null) | ✔️ null |
| 🟢 | Null-3 | ✔️ 1099 | ✔️ unitTest(Null-3): not(number(1.0) > null) | ✔️ null |
| 🟢 | Null-4 | ✔️ 1199 | ✔️ unitTest(Null-4): not(null > number(-1.0)) | ✔️ null |
| 🟢 | Null-5 | ✔️ 1299 | ✔️ unitTest(Null-5): not(null > number(1.0)) | ✔️ null |
| 🟢 | Duration-1 | ✔️ 1399 | ✔️ unitTest(Duration-1): 'PT1M' > 'PT1S' | ✔️ null |
| 🟢 | Duration-2 | ✔️ 1499 | ✔️ unitTest(Duration-2): '1m'.asDuration() > 'PT1S' | ✔️ null |
Generation Bundle
| File | MD5 | |
|---|---|---|
| Open | /ce/unit-test/greater-than/policy.yaml | 2F2E803A5F7D5E596C739C941D1DEB3E |
| Open | /ce/unit-test/greater-than/unit-test.logic.yaml | 721015362BCE38734B1DEDDB92299802 |
Available Commands
repo-manager policies generate FULL /ce/unit-test/greater-than/unit-test.logic.yaml
repo-manager policies generate DEBUG /ce/unit-test/greater-than/unit-test.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/unit-test/greater-than/unit-test.logic.yaml
repo-manager policies generate TESTS /ce/unit-test/greater-than/unit-test.logic.yaml
# Execute tests
repo-manager policies test /ce/unit-test/greater-than/unit-test.logic.yaml
Content
---
inputType: CA10__CaAwsInstance__c
conditions:
- status: COMPLIANT
currentStateMessage: Simple-1
check:
UNIT_TEST:
id: Simple-1
expected:
text: "unitTest(Simple-1): not(number(0.0) > number(1.0))"
arg:
NOT:
arg:
GREATER_THAN:
left:
NUMBER: 0
right:
NUMBER: 1
- status: COMPLIANT
currentStateMessage: Simple-2
check:
UNIT_TEST:
id: Simple-2
expected:
text: "unitTest(Simple-2): number(1.0) > number(0.0)"
arg:
GREATER_THAN:
left:
NUMBER: 1
right:
NUMBER: 0
- status: COMPLIANT
currentStateMessage: Simple-3
check:
UNIT_TEST:
id: Simple-3
expected:
text: "unitTest(Simple-3): not(number(1.0) > number(1.0))"
arg:
NOT:
arg:
GREATER_THAN:
left:
NUMBER: 1
right:
NUMBER: 1
- status: COMPLIANT
currentStateMessage: Simple-4
check:
UNIT_TEST:
id: Simple-4
expected:
text: "unitTest(Simple-4): number(1.0000000001) > number(1.0)"
arg:
GREATER_THAN:
left:
NUMBER: 1.0000000001
right:
NUMBER: 1
- status: COMPLIANT
currentStateMessage: Precision-1
check:
UNIT_TEST:
id: Precision-1
expected:
text: "unitTest(Precision-1): number(1.111111111222224E9) > number(1.111111111222223E9)"
arg:
GREATER_THAN:
left:
NUMBER: 1111111111.222224
right:
NUMBER: 1111111111.222223
- status: COMPLIANT
currentStateMessage: Precision-2
check:
UNIT_TEST:
id: Precision-2
expected:
text: "unitTest(Precision-2): number(1.1111111112222235E9) > number(1.1111111112222233E9)"
arg:
GREATER_THAN:
left:
NUMBER: 1111111111.2222235
right:
NUMBER: 1111111111.2222234
- status: COMPLIANT
currentStateMessage: Precision-3
check:
UNIT_TEST:
id: Precision-3
expected:
text: "unitTest(Precision-3): not(number(1.1111111112222235E9) > number(1.1111111112222235E9))"
arg:
NOT:
arg:
GREATER_THAN:
left:
NUMBER: 1111111111.22222346
right:
NUMBER: 1111111111.22222345
- status: COMPLIANT
currentStateMessage: Null-1
check:
UNIT_TEST:
id: Null-1
expected:
text: "unitTest(Null-1): not(null > null)"
arg:
NOT:
arg:
GREATER_THAN:
left:
UNIT_TEST_NULL:
returnType: NUMBER
right:
UNIT_TEST_NULL:
returnType: NUMBER
- status: COMPLIANT
currentStateMessage: Null-2
check:
UNIT_TEST:
id: Null-2
expected:
text: "unitTest(Null-2): not(number(-1.0) > null)"
arg:
NOT:
arg:
GREATER_THAN:
left:
NUMBER: -1
right:
UNIT_TEST_NULL:
returnType: NUMBER
- status: COMPLIANT
currentStateMessage: Null-3
check:
UNIT_TEST:
id: Null-3
expected:
text: "unitTest(Null-3): not(number(1.0) > null)"
arg:
NOT:
arg:
GREATER_THAN:
left:
NUMBER: 1
right:
UNIT_TEST_NULL:
returnType: NUMBER
- status: COMPLIANT
currentStateMessage: Null-4
check:
UNIT_TEST:
id: Null-4
expected:
text: "unitTest(Null-4): not(null > number(-1.0))"
arg:
NOT:
arg:
GREATER_THAN:
left:
UNIT_TEST_NULL:
returnType: NUMBER
right:
NUMBER: -1
- status: COMPLIANT
currentStateMessage: Null-5
check:
UNIT_TEST:
id: Null-5
expected:
text: "unitTest(Null-5): not(null > number(1.0))"
arg:
NOT:
arg:
GREATER_THAN:
left:
UNIT_TEST_NULL:
returnType: NUMBER
right:
NUMBER: 1
- status: COMPLIANT
currentStateMessage: Duration-1
check:
UNIT_TEST:
id: Duration-1
expected:
text: "unitTest(Duration-1): 'PT1M' > 'PT1S'"
arg:
GREATER_THAN:
left:
DURATION: "PT1M"
right:
DURATION: "PT1S"
- status: COMPLIANT
currentStateMessage: Duration-2
check:
UNIT_TEST:
id: Duration-2
expected:
text: "unitTest(Duration-2): '1m'.asDuration() > 'PT1S'"
arg:
GREATER_THAN:
left:
DURATION_FROM:
arg:
TEXT: "1m"
format: GCP
undeterminedIf:
isEmpty: "Should not happen"
invalidFormat: "Should not happen"
right:
DURATION: "PT1S"
otherwise:
status: INCOMPLIANT
currentStateMessage: Test Failed
remediationMessage: Developer Fix Required