Skip to main content

🧠 ENDS_WITH Unit Tests - unit-test.logic.yaml🟢

Uses

Test Results 🟢

Generated at: 2025-11-05T15:57:30.390866901Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟢Word-1✔️ 199✔️ unitTest(Word-1): not('abcklmxyz'.endsWith('abc'))✔️ null
🟢Word-2✔️ 299✔️ unitTest(Word-2): not('abcklmxyz'.endsWith('klm'))✔️ null
🟢Word-3✔️ 399✔️ unitTest(Word-3): 'abcklmxyz'.endsWith('xyz')✔️ null
🟢Word-4✔️ 499✔️ unitTest(Word-4): not('abcklmxyz'.endsWith('123'))✔️ null
🟢Multiple-1✔️ 599✔️ unitTest(Multiple-1): not('abc klm xyz'.endsWith('abc'))✔️ null
🟢Multiple-2✔️ 699✔️ unitTest(Multiple-2): not('abc klm xyz'.endsWith('klm'))✔️ null
🟢Multiple-3✔️ 799✔️ unitTest(Multiple-3): 'abc klm xyz'.endsWith('xyz')✔️ null
🟢Multiple-4✔️ 899✔️ unitTest(Multiple-4): not('abc klm xyz'.endsWith('123'))✔️ null
🟢Whitespace-1✔️ 999✔️ unitTest(Whitespace-1): ' aa bb cc '.endsWith('bb cc')✔️ null
🟢Whitespace-2✔️ 1099✔️ unitTest(Whitespace-2): 'aa bb cc'.endsWith(' bb cc ')✔️ null
🟢Whitespace-3✔️ 1199✔️ unitTest(Whitespace-3): ''.endsWith('\n\r\t')✔️ null
🟢Whitespace-4✔️ 1299✔️ unitTest(Whitespace-4): 'a b c'.endsWith(' a\n b \r c \t')✔️ null
🟢Case-1✔️ 1399✔️ unitTest(Case-1): 'ABC KLM XYZ'.endsWith('xyz')✔️ null
🟢Null-1✔️ 1499✔️ unitTest(Null-1): null.endsWith(null)✔️ null
🟢Null-2✔️ 1599✔️ unitTest(Null-2): ''.endsWith(null)✔️ null
🟢Null-3✔️ 1699✔️ unitTest(Null-3): 'abc'.endsWith(null)✔️ null
🟢Null-4✔️ 1799✔️ unitTest(Null-4): null.endsWith('')✔️ null
🟢Null-5✔️ 1899✔️ unitTest(Null-5): not(null.endsWith('abc'))✔️ null

Generation Bundle

FileMD5
Open/ce/unit-test/ends-with/policy.yaml97E2801FAD3C39032E37A3E8E8610B59
Open/ce/unit-test/ends-with/unit-test.logic.yaml0C79C5A4E4BAAEC5B8A1525857F4F6E8

Available Commands

repo-manager policies generate FULL /ce/unit-test/ends-with/unit-test.logic.yaml
repo-manager policies generate DEBUG /ce/unit-test/ends-with/unit-test.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/unit-test/ends-with/unit-test.logic.yaml
repo-manager policies generate TESTS /ce/unit-test/ends-with/unit-test.logic.yaml
# Execute tests
repo-manager policies test /ce/unit-test/ends-with/unit-test.logic.yaml

Content

Open File

---
inputType: CA10__CaAwsInstance__c
conditions:
- status: COMPLIANT
currentStateMessage: Word-1
check:
UNIT_TEST:
id: Word-1
expected:
text: "unitTest(Word-1): not('abcklmxyz'.endsWith('abc'))"
arg:
NOT:
arg:
ENDS_WITH:
arg:
TEXT: "abcklmxyz"
search:
TEXT: "abc"
- status: COMPLIANT
currentStateMessage: Word-2
check:
UNIT_TEST:
id: Word-2
expected:
text: "unitTest(Word-2): not('abcklmxyz'.endsWith('klm'))"
arg:
NOT:
arg:
ENDS_WITH:
arg:
TEXT: "abcklmxyz"
search:
TEXT: "klm"
- status: COMPLIANT
currentStateMessage: Word-3
check:
UNIT_TEST:
id: Word-3
expected:
text: "unitTest(Word-3): 'abcklmxyz'.endsWith('xyz')"
arg:
ENDS_WITH:
arg:
TEXT: "abcklmxyz"
search:
TEXT: "xyz"
- status: COMPLIANT
currentStateMessage: Word-4
check:
UNIT_TEST:
id: Word-4
expected:
text: "unitTest(Word-4): not('abcklmxyz'.endsWith('123'))"
arg:
NOT:
arg:
ENDS_WITH:
arg:
TEXT: "abcklmxyz"
search:
TEXT: "123"
- status: COMPLIANT
currentStateMessage: Multiple-1
check:
UNIT_TEST:
id: Multiple-1
expected:
text: "unitTest(Multiple-1): not('abc klm xyz'.endsWith('abc'))"
arg:
NOT:
arg:
ENDS_WITH:
arg:
TEXT: "abc klm xyz"
search:
TEXT: "abc"
- status: COMPLIANT
currentStateMessage: Multiple-2
check:
UNIT_TEST:
id: Multiple-2
expected:
text: "unitTest(Multiple-2): not('abc klm xyz'.endsWith('klm'))"
arg:
NOT:
arg:
ENDS_WITH:
arg:
TEXT: "abc klm xyz"
search:
TEXT: "klm"
- status: COMPLIANT
currentStateMessage: Multiple-3
check:
UNIT_TEST:
id: Multiple-3
expected:
text: "unitTest(Multiple-3): 'abc klm xyz'.endsWith('xyz')"
arg:
ENDS_WITH:
arg:
TEXT: "abc klm xyz"
search:
TEXT: "xyz"
- status: COMPLIANT
currentStateMessage: Multiple-4
check:
UNIT_TEST:
id: Multiple-4
expected:
text: "unitTest(Multiple-4): not('abc klm xyz'.endsWith('123'))"
arg:
NOT:
arg:
ENDS_WITH:
arg:
TEXT: "abc klm xyz"
search:
TEXT: "123"
- status: COMPLIANT
currentStateMessage: Whitespace-1
check:
UNIT_TEST:
id: Whitespace-1
expected:
text: "unitTest(Whitespace-1): ' aa bb cc '.endsWith('bb cc')"
arg:
ENDS_WITH:
arg:
TEXT: " aa bb cc "
search:
TEXT: "bb cc"
- status: COMPLIANT
currentStateMessage: Whitespace-2
check:
UNIT_TEST:
id: Whitespace-2
expected:
text: "unitTest(Whitespace-2): 'aa bb cc'.endsWith(' bb cc ')"
arg:
ENDS_WITH:
arg:
TEXT: "aa bb cc"
search:
TEXT: " bb cc "
- status: COMPLIANT
currentStateMessage: Whitespace-3
check:
UNIT_TEST:
id: Whitespace-3
expected:
text: "unitTest(Whitespace-3): ''.endsWith('\\n\\r\\t')"
arg:
ENDS_WITH:
arg:
TEXT: ""
search:
TEXT: "\n\r\t"
- status: COMPLIANT
currentStateMessage: Whitespace-4
check:
UNIT_TEST:
id: Whitespace-4
expected:
text: "unitTest(Whitespace-4): 'a b c'.endsWith(' a\\n b \\r c \\t')"
arg:
ENDS_WITH:
arg:
TEXT: "a b c"
search:
TEXT: " a\n b \r c \t"
- status: COMPLIANT
currentStateMessage: Case-1
check:
UNIT_TEST:
id: Case-1
expected:
text: "unitTest(Case-1): 'ABC KLM XYZ'.endsWith('xyz')"
arg:
ENDS_WITH:
arg:
TEXT: "ABC KLM XYZ"
search:
TEXT: "xyz"
- status: COMPLIANT
currentStateMessage: Null-1
check:
UNIT_TEST:
id: Null-1
expected:
text: "unitTest(Null-1): null.endsWith(null)"
arg:
ENDS_WITH:
arg:
UNIT_TEST_NULL:
returnType: TEXT
search:
UNIT_TEST_NULL:
returnType: TEXT
- status: COMPLIANT
currentStateMessage: Null-2
check:
UNIT_TEST:
id: Null-2
expected:
text: "unitTest(Null-2): ''.endsWith(null)"
arg:
ENDS_WITH:
arg:
TEXT: ""
search:
UNIT_TEST_NULL:
returnType: TEXT
- status: COMPLIANT
currentStateMessage: Null-3
check:
UNIT_TEST:
id: Null-3
expected:
text: "unitTest(Null-3): 'abc'.endsWith(null)"
arg:
ENDS_WITH:
arg:
TEXT: "abc"
search:
UNIT_TEST_NULL:
returnType: TEXT
- status: COMPLIANT
currentStateMessage: Null-4
check:
UNIT_TEST:
id: Null-4
expected:
text: "unitTest(Null-4): null.endsWith('')"
arg:
ENDS_WITH:
arg:
UNIT_TEST_NULL:
returnType: TEXT
search:
TEXT: ""
- status: COMPLIANT
currentStateMessage: Null-5
check:
UNIT_TEST:
id: Null-5
expected:
text: "unitTest(Null-5): not(null.endsWith('abc'))"
arg:
NOT:
arg:
ENDS_WITH:
arg:
UNIT_TEST_NULL:
returnType: TEXT
search:
TEXT: "abc"
otherwise:
status: INCOMPLIANT
currentStateMessage: Test Failed
remediationMessage: Developer Fix Required