π§ SET Unit Tests for Bytes Items - unit-test.logic.yaml π’
- Contextual name: π§ unit-test.logic.yaml π’
- ID:
/ce/unit-test/set/bytes-items/unit-test.logic.yaml
- Located in: π SET Unit Tests for Bytes Items π’
Flagsβ
- π’ Logic test success
- π’ Logic with test data
- π’ Unit-test logic
Input Typeβ
Type | API Name | Extracts | Extract Files | Logic Files | |
---|---|---|---|---|---|
π | π AWS EC2 Instance | CA10__CaAwsInstance__c | 12 | 2 | 53 |
Usesβ
None
Test Results π’β
Generated at: 2025-07-08T23:29:13.718007600Z Open
Result | Id | Condition Index | Condition Text | Runtime Error |
---|---|---|---|---|
π’ | Null-And-Null | βοΈ 199 | βοΈ unitTest(Null-And-Null): null == null | βοΈ null |
π’ | Null-And-Empty | βοΈ 299 | βοΈ unitTest(Null-And-Empty): null == setOfBytes([]) | βοΈ null |
π’ | Empty-And-Empty-Item | βοΈ 399 | βοΈ unitTest(Empty-And-Empty-Item): setOfBytes([]) == setOfBytes(['']) | βοΈ null |
π’ | Empty-And-Empty-Items | βοΈ 499 | βοΈ unitTest(Empty-And-Empty-Items): setOfBytes([]) == setOfBytes(['', '', '']) | βοΈ null |
π’ | One-Empty-And-Many-Empty | βοΈ 599 | βοΈ unitTest(One-Empty-And-Many-Empty): setOfBytes(['']) == setOfBytes(['', '', '']) | βοΈ null |
π’ | Same-Number-Of-Empty | βοΈ 699 | βοΈ unitTest(Same-Number-Of-Empty): setOfBytes(['', '', '']) == setOfBytes(['', '', '']) | βοΈ null |
π’ | Empty-With-Whitespaces | βοΈ 799 | βοΈ unitTest(Empty-With-Whitespaces): setOfBytes(['']) != setOfBytes(['', ' ', '\t', '\n', '\r', ' \n\r\t ']) | βοΈ null |
π’ | Empty-With-Whitespaces-Size | βοΈ 899 | βοΈ unitTest(Empty-With-Whitespaces-Size): setOfBytes(['', ' ', '\t', '\n', '\r', ' \n\r\t ']).size() == number(5.0) | βοΈ null |
π’ | Same-Number-Of-Whitespaces | βοΈ 999 | βοΈ unitTest(Same-Number-Of-Whitespaces): setOfBytes(['', ' ', ' ', ' ', ' ', ' ']) != setOfBytes(['', ' ', '\t', '\n', '\r', ' \n\r\t ']) | βοΈ null |
π’ | Empty-And-Non-Empty | βοΈ 1099 | βοΈ unitTest(Empty-And-Non-Empty): setOfBytes(['a']) != setOfBytes([' ', 'a']) | βοΈ null |
π’ | Empty-And-Non-Empty-Size | βοΈ 1199 | βοΈ unitTest(Empty-And-Non-Empty-Size): setOfBytes([' ', 'a']).size() == number(2.0) | βοΈ null |
π’ | Duplicate-Values | βοΈ 1299 | βοΈ unitTest(Duplicate-Values): setOfBytes(['a']) == setOfBytes(['a', 'a']) | βοΈ null |
π’ | Duplicate-Values-Size | βοΈ 1399 | βοΈ unitTest(Duplicate-Values-Size): setOfBytes(['a', 'a']).size() == number(1.0) | βοΈ null |
π’ | Duplicate-Values-Different-Case | βοΈ 1499 | βοΈ unitTest(Duplicate-Values-Different-Case): setOfBytes(['a', 'a']) != setOfBytes(['A', 'a']) | βοΈ null |
π’ | Duplicate-Values-Different-Case-Size | βοΈ 1599 | βοΈ unitTest(Duplicate-Values-Different-Case-Size): setOfBytes(['A', 'a']).size() == number(2.0) | βοΈ null |
π’ | Duplicate-Values-Whitespace | βοΈ 1699 | βοΈ unitTest(Duplicate-Values-Whitespace): setOfBytes(['a', 'a']) != setOfBytes([' a ', 'a']) | βοΈ null |
π’ | Duplicate-Values-Whitespace-Size | βοΈ 1799 | βοΈ unitTest(Duplicate-Values-Whitespace-Size): setOfBytes([' a ', 'a']).size() == number(2.0) | βοΈ null |
π’ | Duplicate-Values-Whitespaces-Inside | βοΈ 1899 | βοΈ unitTest(Duplicate-Values-Whitespaces-Inside): setOfBytes(['a b', 'a b', 'a b']) != setOfBytes(['a b', 'a b', 'a\nb']) | βοΈ null |
π’ | Duplicate-Values-Whitespaces-Inside-Size | βοΈ 1999 | βοΈ unitTest(Duplicate-Values-Whitespaces-Inside-Size): setOfBytes(['a b', 'a b', 'a\nb']).size() == number(3.0) | βοΈ null |
π’ | Value-Order | βοΈ 2099 | βοΈ unitTest(Value-Order): setOfBytes(['a', 'b']) == setOfBytes(['b', 'a']) | βοΈ null |
Generationβ
File | MD5 | |
---|---|---|
Open | /ce/unit-test/set/bytes-items/policy.yaml | E4B5B8140408947D4C0AC70B11E2DA32 |
Open | /ce/unit-test/set/bytes-items/unit-test.logic.yaml | 10BA363D38243120A67374BDF64093C7 |
Generate FULL scriptβ
java -jar repo-manager.jar policies generate FULL /ce/unit-test/set/bytes-items/unit-test.logic.yaml
Generate DEBUG scriptβ
java -jar repo-manager.jar policies generate DEBUG /ce/unit-test/set/bytes-items/unit-test.logic.yaml
Generate CAPTURE_TEST_DATA scriptβ
java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/unit-test/set/bytes-items/unit-test.logic.yaml
Generate TESTS scriptβ
java -jar repo-manager.jar policies generate TESTS /ce/unit-test/set/bytes-items/unit-test.logic.yaml
Execute testsβ
java -jar repo-manager.jar policies test /ce/unit-test/set/bytes-items/unit-test.logic.yaml
Contentβ
---
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: SET_OF_BYTES
right:
UNIT_TEST_NULL:
returnType: SET_OF_BYTES
- status: COMPLIANT
currentStateMessage: Null and Empty
check:
UNIT_TEST:
id: Null-And-Empty
expected:
text: "unitTest(Null-And-Empty): null == setOfBytes([])"
arg:
IS_EQUAL:
left:
UNIT_TEST_NULL:
returnType: SET_OF_BYTES
right:
SET:
itemType: BYTES
items: []
- status: COMPLIANT
currentStateMessage: Empty and Empty Item
check:
UNIT_TEST:
id: Empty-And-Empty-Item
expected:
text: "unitTest(Empty-And-Empty-Item): setOfBytes([]) == setOfBytes([''])"
arg:
IS_EQUAL:
left:
SET:
itemType: BYTES
items: []
right:
SET:
itemType: BYTES
items:
- ""
- status: COMPLIANT
currentStateMessage: Empty and Empty Items
check:
UNIT_TEST:
id: Empty-And-Empty-Items
expected:
text: "unitTest(Empty-And-Empty-Items): setOfBytes([]) == setOfBytes(['', '', ''])"
arg:
IS_EQUAL:
left:
SET:
itemType: BYTES
items: []
right:
SET:
itemType: BYTES
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): setOfBytes(['']) == setOfBytes(['', '', ''])"
arg:
IS_EQUAL:
left:
SET:
itemType: BYTES
items:
- ""
right:
SET:
itemType: BYTES
items:
- ""
- ""
- ""
- status: COMPLIANT
currentStateMessage: Same Number Of Empty
check:
UNIT_TEST:
id: Same-Number-Of-Empty
expected:
text: "unitTest(Same-Number-Of-Empty): setOfBytes(['', '', '']) == setOfBytes(['', '', ''])"
arg:
IS_EQUAL:
left:
SET:
itemType: BYTES
items:
- ""
- ""
- ""
right:
SET:
itemType: BYTES
items:
- ""
- ""
- ""
- status: COMPLIANT
currentStateMessage: Empty with Whitespaces
check:
UNIT_TEST:
id: Empty-With-Whitespaces
expected:
text: "unitTest(Empty-With-Whitespaces): setOfBytes(['']) != setOfBytes(['', ' ', '\\t', '\\n', '\\r', ' \\n\\r\\t '])"
arg:
NOT_EQUAL:
left:
SET:
itemType: BYTES
items:
- ""
right:
SET:
itemType: BYTES
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): setOfBytes(['', ' ', '\\t', '\\n', '\\r', ' \\n\\r\\t ']).size() == number(5.0)"
arg:
IS_EQUAL:
left:
SIZE:
arg:
SET:
itemType: BYTES
items:
- ""
- " "
- "\t"
- "\n"
- "\r"
- " \n\r\t "
right:
NUMBER: 5
- status: COMPLIANT
currentStateMessage: Same Number Of Whitespaces
check:
UNIT_TEST:
id: Same-Number-Of-Whitespaces
expected:
text: "unitTest(Same-Number-Of-Whitespaces): setOfBytes(['', ' ', ' ', ' ', ' ', ' ']) != setOfBytes(['', ' ', '\\t', '\\n', '\\r', ' \\n\\r\\t '])"
arg:
NOT_EQUAL:
left:
SET:
itemType: BYTES
items:
- ""
- " "
- " "
- " "
- " "
- " "
right:
SET:
itemType: BYTES
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): setOfBytes(['a']) != setOfBytes([' ', 'a'])"
arg:
NOT_EQUAL:
left:
SET:
itemType: BYTES
items:
- "a"
right:
SET:
itemType: BYTES
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): setOfBytes([' ', 'a']).size() == number(2.0)"
arg:
IS_EQUAL:
left:
SIZE:
arg:
SET:
itemType: BYTES
items:
- " "
- "a"
right:
NUMBER: 2
- status: COMPLIANT
currentStateMessage: Duplicate Values
check:
UNIT_TEST:
id: Duplicate-Values
expected:
text: "unitTest(Duplicate-Values): setOfBytes(['a']) == setOfBytes(['a', 'a'])"
arg:
IS_EQUAL:
left:
SET:
itemType: BYTES
items:
- "a"
right:
SET:
itemType: BYTES
items:
- "a"
- "a"
- status: COMPLIANT
currentStateMessage: Duplicate Values Size
check:
UNIT_TEST:
id: Duplicate-Values-Size
expected:
text: "unitTest(Duplicate-Values-Size): setOfBytes(['a', 'a']).size() == number(1.0)"
arg:
IS_EQUAL:
left:
SIZE:
arg:
SET:
itemType: BYTES
items:
- "a"
- "a"
right:
NUMBER: 1
- status: COMPLIANT
currentStateMessage: Duplicate Values in Different Case
check:
UNIT_TEST:
id: Duplicate-Values-Different-Case
expected:
text: "unitTest(Duplicate-Values-Different-Case): setOfBytes(['a', 'a']) != setOfBytes(['A', 'a'])"
arg:
NOT_EQUAL:
left:
SET:
itemType: BYTES
items:
- "a"
- "a"
right:
SET:
itemType: BYTES
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): setOfBytes(['A', 'a']).size() == number(2.0)"
arg:
IS_EQUAL:
left:
SIZE:
arg:
SET:
itemType: BYTES
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): setOfBytes(['a', 'a']) != setOfBytes([' a ', 'a'])"
arg:
NOT_EQUAL:
left:
SET:
itemType: BYTES
items:
- "a"
- "a"
right:
SET:
itemType: BYTES
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): setOfBytes([' a ', 'a']).size() == number(2.0)"
arg:
IS_EQUAL:
left:
SIZE:
arg:
SET:
itemType: BYTES
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): setOfBytes(['a b', 'a b', 'a b']) != setOfBytes(['a b', 'a b', 'a\\nb'])"
arg:
NOT_EQUAL:
left:
SET:
itemType: BYTES
items:
- "a b"
- "a b"
- "a b"
right:
SET:
itemType: BYTES
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): setOfBytes(['a b', 'a b', 'a\\nb']).size() == number(3.0)"
arg:
IS_EQUAL:
left:
SIZE:
arg:
SET:
itemType: BYTES
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): setOfBytes(['a', 'b']) == setOfBytes(['b', 'a'])"
arg:
IS_EQUAL:
left:
SET:
itemType: BYTES
items:
- "a"
- "b"
right:
SET:
itemType: BYTES
items:
- "b"
- "a"
otherwise:
status: INCOMPLIANT
currentStateMessage: Test Failed
remediationMessage: Developer Fix Required