π§ IS_EQUAL / NOT_EQUAL Unit Tests: CollectionType - unit-test.logic.yaml π’
- Contextual name: π§ unit-test.logic.yaml π’
- ID:
/ce/unit-test/is-equal/collection/unit-test.logic.yaml
- Located in: π IS_EQUAL / NOT_EQUAL Unit Tests: CollectionType π’
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 | 44 |
Usesβ
- π§ͺ test-data.json
Test Results π’β
Generated at: 2025-04-24T23:47:59.616629557Z Open
Result | Id | Condition Index | Condition Text | Runtime Error |
---|---|---|---|---|
π’ | Test-1 | βοΈ 199 | βοΈ unitTest(Test-1): ['a', 'b', 'c'] == ['a', 'b', 'c'] | βοΈ null |
π’ | Test-2 | βοΈ 299 | βοΈ unitTest(Test-2): ['a', 'b', 'c'] == ['c', 'a', 'b'] | βοΈ null |
π’ | Test-3 | βοΈ 399 | βοΈ unitTest(Test-3): ['a', 'b', 'c'] == ['a', 'a', 'b', 'b', 'c', 'c'] | βοΈ null |
π’ | Test-4 | βοΈ 499 | βοΈ unitTest(Test-4): ['a', 'b', 'c'] == ['a ', ' b ', ' c'] | βοΈ null |
π’ | Test-5 | βοΈ 599 | βοΈ unitTest(Test-5): ['a', 'b', 'c'] == ['A', 'B', 'C'] | βοΈ null |
π’ | Test-6 | βοΈ 699 | βοΈ unitTest(Test-6): [] == [] | βοΈ null |
π’ | Test-7 | βοΈ 799 | βοΈ unitTest(Test-7): null == null | βοΈ null |
π’ | Test-8 | βοΈ 899 | βοΈ unitTest(Test-8): [] == null | βοΈ null |
Generationβ
File | MD5 | |
---|---|---|
Open | /ce/unit-test/is-equal/collection/policy.yaml | 096A8AE8A73F8BAB47492120DE8B89B3 |
Open | /ce/unit-test/is-equal/collection/unit-test.logic.yaml | 1C327BECC08CA5FFCF0533B6844A7458 |
Open | /ce/unit-test/is-equal/collection/test-data.json | 170E1A734671364C6EAC61170004C726 |
Generate FULL scriptβ
java -jar repo-manager.jar policies generate FULL /ce/unit-test/is-equal/collection/unit-test.logic.yaml
Generate DEBUG scriptβ
java -jar repo-manager.jar policies generate DEBUG /ce/unit-test/is-equal/collection/unit-test.logic.yaml
Generate CAPTURE_TEST_DATA scriptβ
java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/unit-test/is-equal/collection/unit-test.logic.yaml
Generate TESTS scriptβ
java -jar repo-manager.jar policies generate TESTS /ce/unit-test/is-equal/collection/unit-test.logic.yaml
Execute testsβ
java -jar repo-manager.jar policies test /ce/unit-test/is-equal/collection/unit-test.logic.yaml
Contentβ
---
inputType: CA10__CaAwsInstance__c
testData:
- file: test-data.json
conditions:
- status: COMPLIANT
currentStateMessage: Test-1
check:
UNIT_TEST:
id: Test-1
arg:
IS_EQUAL:
left:
COLLECTION:
items:
- a
- b
- c
right:
COLLECTION:
items:
- a
- b
- c
- status: COMPLIANT
currentStateMessage: Test-2
check:
UNIT_TEST:
id: Test-2
arg:
IS_EQUAL:
left:
COLLECTION:
items:
- a
- b
- c
right:
COLLECTION:
items:
- c
- a
- b
- status: COMPLIANT
currentStateMessage: Test-3
check:
UNIT_TEST:
id: Test-3
arg:
IS_EQUAL:
left:
COLLECTION:
items:
- a
- b
- c
right:
COLLECTION:
items:
- a
- a
- b
- b
- c
- c
- status: COMPLIANT
currentStateMessage: Test-4
check:
UNIT_TEST:
id: Test-4
arg:
IS_EQUAL:
left:
COLLECTION:
items:
- a
- b
- c
right:
COLLECTION:
items:
- "a "
- " b "
- " c"
- status: COMPLIANT
currentStateMessage: Test-5
check:
UNIT_TEST:
id: Test-5
arg:
IS_EQUAL:
left:
COLLECTION:
items:
- a
- b
- c
right:
COLLECTION:
items:
- A
- B
- C
- status: COMPLIANT
currentStateMessage: Test-6
check:
UNIT_TEST:
id: Test-6
arg:
IS_EQUAL:
left:
COLLECTION:
items: []
right:
COLLECTION:
items: []
- status: COMPLIANT
currentStateMessage: Test-7
check:
UNIT_TEST:
id: Test-7
arg:
IS_EQUAL:
left:
UNIT_TEST_NULL:
returnType: COLLECTION
right:
UNIT_TEST_NULL:
returnType: COLLECTION
- status: COMPLIANT
currentStateMessage: Test-8
check:
UNIT_TEST:
id: Test-8
arg:
IS_EQUAL:
left:
COLLECTION:
items: []
right:
UNIT_TEST_NULL:
returnType: COLLECTION
otherwise:
status: INCOMPLIANT
currentStateMessage: Test Failed
remediationMessage: Developer Fix Required