-
Notifications
You must be signed in to change notification settings - Fork 27
Description
unit-test-coreid-SENDIG_49.xlsx
In SEND49 we need to test whether, when the SENDIG states that there is a codelists associated to a variable, it must be declared in the define.xml, either on the variable level or at the valuelist level.
So, we want to first check on the variable level, where we use:
- name: 'library_variable_ccode'
operator: non_empty - name: define_variable_ccode
operator: not_equal_to
value: library_variable_ccode
if the result of the second is "false", we need to further check on the valuelist level.
So we change/add (full code is in the rule-editor): - name: 'library_variable_ccode'
operator: non_empty- any:
- name: define_vlm_ccode
operator: not_equal_to
value: 'test' - name: define_variable_ccode
operator: empty - name: define_variable_ccode
operator: not_equal_to
value: library_variable_ccode
- name: define_vlm_ccode
- any:
but then we get a message "define_vlm_ccode":"Not in dataset"
As "define_vlm_ccode" is defined as "ValueListDef.ItemDef.CodeList.Alias.Name" it looks as it acts on a single ValueList-ItemDef. But as we start by checking on a variable ItemDef, it looks as the system does not recognize that a "ValueList" is added to the variable (ItemDef).
The request is to develop something so that we can check both on the variable level as on the valuelist level, i.e. when we start at the variable level, it is recognized when there is a valuelist attached to that variable, and that for each item in the valuelist, we can check on presence of a codelist and whether this codelist is the correct one to be used.
I attach a test file "define_negative_VSORRESU_ValueList_test.xml" where for VSORRESU, the codelist has been "delegated" to the ValueList level ItemDefs.
If more test files are needed, please let me know.