π§ IS_EMPTY / NOT_EMPTY Unit Tests: TextType - unit-test.logic.yaml π’
- Contextual name: π§ unit-test.logic.yaml π’
- ID:
/ce/unit-test/is-empty/text/unit-test.logic.yaml
- Located in: π IS_EMPTY / NOT_EMPTY Unit Tests: TextType π’
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:57.618445868Z Open
Result | Id | Condition Index | Condition Text | Runtime Error |
---|---|---|---|---|
π’ | Test-1 | βοΈ 199 | βοΈ unitTest(Test-1): 'abc'.isNotEmpty() | βοΈ null |
π’ | Test-2 | βοΈ 299 | βοΈ unitTest(Test-2): ' '.isEmpty() | βοΈ null |
π’ | Test-3 | βοΈ 399 | βοΈ unitTest(Test-3): '\n\r\t'.isEmpty() | βοΈ null |
π’ | Test-4 | βοΈ 499 | βοΈ unitTest(Test-4): ''.isEmpty() | βοΈ null |
π’ | Test-5 | βοΈ 599 | βοΈ unitTest(Test-5): null.isEmpty() | βοΈ null |
Generationβ
File | MD5 | |
---|---|---|
Open | /ce/unit-test/is-empty/text/policy.yaml | 5F50FCA2352326A5CF77C7DF1D42FC17 |
Open | /ce/unit-test/is-empty/text/unit-test.logic.yaml | 01B201B37C09CA6AA4500F60637B5980 |
Open | /ce/unit-test/is-empty/text/test-data.json | 60B918F0DA9AC16FA0F8CCAEBDAEE806 |
Generate FULL scriptβ
java -jar repo-manager.jar policies generate FULL /ce/unit-test/is-empty/text/unit-test.logic.yaml
Generate DEBUG scriptβ
java -jar repo-manager.jar policies generate DEBUG /ce/unit-test/is-empty/text/unit-test.logic.yaml
Generate CAPTURE_TEST_DATA scriptβ
java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/unit-test/is-empty/text/unit-test.logic.yaml
Generate TESTS scriptβ
java -jar repo-manager.jar policies generate TESTS /ce/unit-test/is-empty/text/unit-test.logic.yaml
Execute testsβ
java -jar repo-manager.jar policies test /ce/unit-test/is-empty/text/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:
NOT_EMPTY:
arg:
TEXT: "abc"
- status: COMPLIANT
currentStateMessage: Test-2
check:
UNIT_TEST:
id: Test-2
arg:
IS_EMPTY:
arg:
TEXT: " "
- status: COMPLIANT
currentStateMessage: Test-3
check:
UNIT_TEST:
id: Test-3
arg:
IS_EMPTY:
arg:
TEXT: "\n\r\t"
- status: COMPLIANT
currentStateMessage: Test-4
check:
UNIT_TEST:
id: Test-4
arg:
IS_EMPTY:
arg:
TEXT: ""
- status: COMPLIANT
currentStateMessage: Test-4
check:
UNIT_TEST:
id: Test-5
arg:
IS_EMPTY:
arg:
UNIT_TEST_NULL:
returnType: TEXT
otherwise:
status: INCOMPLIANT
currentStateMessage: Test Failed
remediationMessage: Developer Fix Required