Skip to main content

🧠 LIST Unit Tests for Text Items - unit-test.logic.yaml 🟒

  • Contextual name: 🧠 unit-test.logic.yaml 🟒
  • ID: /ce/unit-test/list/text-items/unit-test.logic.yaml
  • Located in: πŸ“ LIST Unit Tests for Text Items 🟒

Flags​

Input Type​

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

Uses​

None

Test Results πŸŸ’β€‹

Generated at: 2025-07-08T23:29:10.127118272Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒Null-And-Nullβœ”οΈ 199βœ”οΈ unitTest(Null-And-Null): null == nullβœ”οΈ null
🟒Null-And-Emptyβœ”οΈ 299βœ”οΈ unitTest(Null-And-Empty): null == listOfText([])βœ”οΈ null
🟒Empty-And-Empty-Itemβœ”οΈ 399βœ”οΈ unitTest(Empty-And-Empty-Item): listOfText([]) != listOfText([''])βœ”οΈ null
🟒Empty-And-Empty-Itemsβœ”οΈ 499βœ”οΈ unitTest(Empty-And-Empty-Items): listOfText([]) != listOfText(['', '', ''])βœ”οΈ null
🟒One-Empty-And-Many-Emptyβœ”οΈ 599βœ”οΈ unitTest(One-Empty-And-Many-Empty): listOfText(['']) != listOfText(['', '', ''])βœ”οΈ null
🟒Same-Number-Of-Emptyβœ”οΈ 699βœ”οΈ unitTest(Same-Number-Of-Empty): listOfText(['', '', '']) == listOfText(['', '', ''])βœ”οΈ null
🟒Empty-With-Whitespacesβœ”οΈ 799βœ”οΈ unitTest(Empty-With-Whitespaces): listOfText(['']) != listOfText(['', ' ', '\t', '\n', '\r', ' \n\r\t '])βœ”οΈ null
🟒Empty-With-Whitespaces-Sizeβœ”οΈ 899βœ”οΈ unitTest(Empty-With-Whitespaces-Size): listOfText(['', ' ', '\t', '\n', '\r', ' \n\r\t ']).size() == number(6.0)βœ”οΈ null
🟒Same-Number-Of-Whitespacesβœ”οΈ 999βœ”οΈ unitTest(Same-Number-Of-Whitespaces): listOfText(['', ' ', ' ', ' ', ' ', ' ']) == listOfText(['', ' ', '\t', '\n', '\r', ' \n\r\t '])βœ”οΈ null
🟒Empty-And-Non-Emptyβœ”οΈ 1099βœ”οΈ unitTest(Empty-And-Non-Empty): listOfText(['a']) != listOfText([' ', 'a'])βœ”οΈ null
🟒Empty-And-Non-Empty-Sizeβœ”οΈ 1199βœ”οΈ unitTest(Empty-And-Non-Empty-Size): listOfText([' ', 'a']).size() == number(2.0)βœ”οΈ null
🟒Duplicate-Valuesβœ”οΈ 1299βœ”οΈ unitTest(Duplicate-Values): listOfText(['a']) != listOfText(['a', 'a'])βœ”οΈ null
🟒Duplicate-Values-Sizeβœ”οΈ 1399βœ”οΈ unitTest(Duplicate-Values-Size): listOfText(['a', 'a']).size() == number(2.0)βœ”οΈ null
🟒Duplicate-Values-Different-Caseβœ”οΈ 1499βœ”οΈ unitTest(Duplicate-Values-Different-Case): listOfText(['a', 'a']) == listOfText(['A', 'a'])βœ”οΈ null
🟒Duplicate-Values-Different-Case-Sizeβœ”οΈ 1599βœ”οΈ unitTest(Duplicate-Values-Different-Case-Size): listOfText(['A', 'a']).size() == number(2.0)βœ”οΈ null
🟒Duplicate-Values-Whitespaceβœ”οΈ 1699βœ”οΈ unitTest(Duplicate-Values-Whitespace): listOfText(['a', 'a']) == listOfText([' a ', 'a'])βœ”οΈ null
🟒Duplicate-Values-Whitespace-Sizeβœ”οΈ 1799βœ”οΈ unitTest(Duplicate-Values-Whitespace-Size): listOfText([' a ', 'a']).size() == number(2.0)βœ”οΈ null
🟒Duplicate-Values-Whitespaces-Insideβœ”οΈ 1899βœ”οΈ unitTest(Duplicate-Values-Whitespaces-Inside): listOfText(['a b', 'a b', 'a b']) == listOfText(['a b', 'a b', 'a\nb'])βœ”οΈ null
🟒Duplicate-Values-Whitespaces-Inside-Sizeβœ”οΈ 1999βœ”οΈ unitTest(Duplicate-Values-Whitespaces-Inside-Size): listOfText(['a b', 'a b', 'a\nb']).size() == number(3.0)βœ”οΈ null
🟒Value-Orderβœ”οΈ 2099βœ”οΈ unitTest(Value-Order): listOfText(['a', 'b']) != listOfText(['b', 'a'])βœ”οΈ null

Generation​

FileMD5
Open/ce/unit-test/list/text-items/policy.yamlC7938C3C06EF0F702555FB5D11FA9766
Open/ce/unit-test/list/text-items/unit-test.logic.yamlD5FA0C7F2A7A5E07B9DBF3D32D2C85F8

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/unit-test/list/text-items/unit-test.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/unit-test/list/text-items/unit-test.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/unit-test/list/text-items/unit-test.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/unit-test/list/text-items/unit-test.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/unit-test/list/text-items/unit-test.logic.yaml

Content​

Open File

---
inputType: CA10__CaAwsInstance__c
conditions:
- status: COMPLIANT
currentStateMessage: Null and Null
check:
UNIT_TEST:
id: Null-And-Null
expected:
text: "unitTest(Null-And-Null): null == null"
arg:
IS_EQUAL:
left:
UNIT_TEST_NULL:
returnType: LIST_OF_TEXT
right:
UNIT_TEST_NULL:
returnType: LIST_OF_TEXT
- status: COMPLIANT
currentStateMessage: Null and Empty
check:
UNIT_TEST:
id: Null-And-Empty
expected:
text: "unitTest(Null-And-Empty): null == listOfText([])"
arg:
IS_EQUAL:
left:
UNIT_TEST_NULL:
returnType: LIST_OF_TEXT
right:
LIST:
itemType: TEXT
items: []
- status: COMPLIANT
currentStateMessage: Empty and Empty Item
check:
UNIT_TEST:
id: Empty-And-Empty-Item
expected:
text: "unitTest(Empty-And-Empty-Item): listOfText([]) != listOfText([''])"
arg:
NOT_EQUAL:
left:
LIST:
itemType: TEXT
items: []
right:
LIST:
itemType: TEXT
items:
- ""
- status: COMPLIANT
currentStateMessage: Empty and Empty Items
check:
UNIT_TEST:
id: Empty-And-Empty-Items
expected:
text: "unitTest(Empty-And-Empty-Items): listOfText([]) != listOfText(['', '', ''])"
arg:
NOT_EQUAL:
left:
LIST:
itemType: TEXT
items: []
right:
LIST:
itemType: TEXT
items:
- ""
- ""
- ""
- status: COMPLIANT
currentStateMessage: One Empty and Many Empty
check:
UNIT_TEST:
id: One-Empty-And-Many-Empty
expected:
text: "unitTest(One-Empty-And-Many-Empty): listOfText(['']) != listOfText(['', '', ''])"
arg:
NOT_EQUAL:
left:
LIST:
itemType: TEXT
items:
- ""
right:
LIST:
itemType: TEXT
items:
- ""
- ""
- ""
- status: COMPLIANT
currentStateMessage: Same Number Of Empty
check:
UNIT_TEST:
id: Same-Number-Of-Empty
expected:
text: "unitTest(Same-Number-Of-Empty): listOfText(['', '', '']) == listOfText(['', '', ''])"
arg:
IS_EQUAL:
left:
LIST:
itemType: TEXT
items:
- ""
- ""
- ""
right:
LIST:
itemType: TEXT
items:
- ""
- ""
- ""
- status: COMPLIANT
currentStateMessage: Empty with Whitespaces
check:
UNIT_TEST:
id: Empty-With-Whitespaces
expected:
text: "unitTest(Empty-With-Whitespaces): listOfText(['']) != listOfText(['', ' ', '\\t', '\\n', '\\r', ' \\n\\r\\t '])"
arg:
NOT_EQUAL:
left:
LIST:
itemType: TEXT
items:
- ""
right:
LIST:
itemType: TEXT
items:
- ""
- " "
- "\t"
- "\n"
- "\r"
- " \n\r\t "
- status: COMPLIANT
currentStateMessage: Empty with Whitespaces Size
check:
UNIT_TEST:
id: Empty-With-Whitespaces-Size
expected:
text: "unitTest(Empty-With-Whitespaces-Size): listOfText(['', ' ', '\\t', '\\n', '\\r', ' \\n\\r\\t ']).size() == number(6.0)"
arg:
IS_EQUAL:
left:
SIZE:
arg:
LIST:
itemType: TEXT
items:
- ""
- " "
- "\t"
- "\n"
- "\r"
- " \n\r\t "
right:
NUMBER: 6
- status: COMPLIANT
currentStateMessage: Same Number Of Whitespaces
check:
UNIT_TEST:
id: Same-Number-Of-Whitespaces
expected:
text: "unitTest(Same-Number-Of-Whitespaces): listOfText(['', ' ', ' ', ' ', ' ', ' ']) == listOfText(['', ' ', '\\t', '\\n', '\\r', ' \\n\\r\\t '])"
arg:
IS_EQUAL:
left:
LIST:
itemType: TEXT
items:
- ""
- " "
- " "
- " "
- " "
- " "
right:
LIST:
itemType: TEXT
items:
- ""
- " "
- "\t"
- "\n"
- "\r"
- " \n\r\t "
- status: COMPLIANT
currentStateMessage: Empty and Non-empty
check:
UNIT_TEST:
id: Empty-And-Non-Empty
expected:
text: "unitTest(Empty-And-Non-Empty): listOfText(['a']) != listOfText([' ', 'a'])"
arg:
NOT_EQUAL:
left:
LIST:
itemType: TEXT
items:
- "a"
right:
LIST:
itemType: TEXT
items:
- " "
- "a"
- status: COMPLIANT
currentStateMessage: Empty and Non-empty Size
check:
UNIT_TEST:
id: Empty-And-Non-Empty-Size
expected:
text: "unitTest(Empty-And-Non-Empty-Size): listOfText([' ', 'a']).size() == number(2.0)"
arg:
IS_EQUAL:
left:
SIZE:
arg:
LIST:
itemType: TEXT
items:
- " "
- "a"
right:
NUMBER: 2
- status: COMPLIANT
currentStateMessage: Duplicate Values
check:
UNIT_TEST:
id: Duplicate-Values
expected:
text: "unitTest(Duplicate-Values): listOfText(['a']) != listOfText(['a', 'a'])"
arg:
NOT_EQUAL:
left:
LIST:
itemType: TEXT
items:
- "a"
right:
LIST:
itemType: TEXT
items:
- "a"
- "a"
- status: COMPLIANT
currentStateMessage: Duplicate Values Size
check:
UNIT_TEST:
id: Duplicate-Values-Size
expected:
text: "unitTest(Duplicate-Values-Size): listOfText(['a', 'a']).size() == number(2.0)"
arg:
IS_EQUAL:
left:
SIZE:
arg:
LIST:
itemType: TEXT
items:
- "a"
- "a"
right:
NUMBER: 2
- status: COMPLIANT
currentStateMessage: Duplicate Values in Different Case
check:
UNIT_TEST:
id: Duplicate-Values-Different-Case
expected:
text: "unitTest(Duplicate-Values-Different-Case): listOfText(['a', 'a']) == listOfText(['A', 'a'])"
arg:
IS_EQUAL:
left:
LIST:
itemType: TEXT
items:
- "a"
- "a"
right:
LIST:
itemType: TEXT
items:
- "A"
- "a"
- status: COMPLIANT
currentStateMessage: Duplicate Values in Different Case Size
check:
UNIT_TEST:
id: Duplicate-Values-Different-Case-Size
expected:
text: "unitTest(Duplicate-Values-Different-Case-Size): listOfText(['A', 'a']).size() == number(2.0)"
arg:
IS_EQUAL:
left:
SIZE:
arg:
LIST:
itemType: TEXT
items:
- "A"
- "a"
right:
NUMBER: 2
- status: COMPLIANT
currentStateMessage: Duplicate Values with Whitespaces
check:
UNIT_TEST:
id: Duplicate-Values-Whitespace
expected:
text: "unitTest(Duplicate-Values-Whitespace): listOfText(['a', 'a']) == listOfText([' a ', 'a'])"
arg:
IS_EQUAL:
left:
LIST:
itemType: TEXT
items:
- "a"
- "a"
right:
LIST:
itemType: TEXT
items:
- " a "
- "a"
- status: COMPLIANT
currentStateMessage: Duplicate Values with Whitespaces Size
check:
UNIT_TEST:
id: Duplicate-Values-Whitespace-Size
expected:
text: "unitTest(Duplicate-Values-Whitespace-Size): listOfText([' a ', 'a']).size() == number(2.0)"
arg:
IS_EQUAL:
left:
SIZE:
arg:
LIST:
itemType: TEXT
items:
- " a "
- "a"
right:
NUMBER: 2
- status: COMPLIANT
currentStateMessage: Duplicate Values with Whitespaces Inside
check:
UNIT_TEST:
id: Duplicate-Values-Whitespaces-Inside
expected:
text: "unitTest(Duplicate-Values-Whitespaces-Inside): listOfText(['a b', 'a b', 'a b']) == listOfText(['a b', 'a b', 'a\\nb'])"
arg:
IS_EQUAL:
left:
LIST:
itemType: TEXT
items:
- "a b"
- "a b"
- "a b"
right:
LIST:
itemType: TEXT
items:
- "a b"
- "a b"
- "a\nb"
- status: COMPLIANT
currentStateMessage: Duplicate Values with Whitespaces Inside Size
check:
UNIT_TEST:
id: Duplicate-Values-Whitespaces-Inside-Size
expected:
text: "unitTest(Duplicate-Values-Whitespaces-Inside-Size): listOfText(['a b', 'a b', 'a\\nb']).size() == number(3.0)"
arg:
IS_EQUAL:
left:
SIZE:
arg:
LIST:
itemType: TEXT
items:
- "a b"
- "a b"
- "a\nb"
right:
NUMBER: 3
- status: COMPLIANT
currentStateMessage: Value Order
check:
UNIT_TEST:
id: Value-Order
expected:
text: "unitTest(Value-Order): listOfText(['a', 'b']) != listOfText(['b', 'a'])"
arg:
NOT_EQUAL:
left:
LIST:
itemType: TEXT
items:
- "a"
- "b"
right:
LIST:
itemType: TEXT
items:
- "b"
- "a"
otherwise:
status: INCOMPLIANT
currentStateMessage: Test Failed
remediationMessage: Developer Fix Required