diff --git a/JsonPreprocessor/CJsonPreprocessor.py b/JsonPreprocessor/CJsonPreprocessor.py index 02e1acf0..12149d1c 100644 --- a/JsonPreprocessor/CJsonPreprocessor.py +++ b/JsonPreprocessor/CJsonPreprocessor.py @@ -180,7 +180,7 @@ def __init__(self, syntax: CSyntaxType = CSyntaxType.python , currentCfg : dict / *Condition*: optional / *Type*: dict / *Default*: {} / - Internally used to aggregate imported json files. + Used to update parameters from jsonp file to current JSON object. """ import builtins import keyword @@ -195,7 +195,6 @@ def __init__(self, syntax: CSyntaxType = CSyntaxType.python , currentCfg : dict self.syntax = syntax self.currentCfg = currentCfg self.dUpdatedParams = {} - self.lNestedParams = [] self.lDotInParamName = [] self.bDuplicatedKeys = True self.jsonCheck = {} @@ -236,7 +235,6 @@ def __reset(self) -> None: self.lImportedFiles = [] self.recursive_level = 0 self.dUpdatedParams = {} - self.lNestedParams = [] self.lDotInParamName = [] self.bDuplicatedKeys = True self.jsonCheck = {} @@ -266,6 +264,7 @@ def __processImportFiles(self, input_data : dict) -> dict: """ out_dict = {} i=1 + sCheckElement = CNameMangling.DUPLICATEDKEY_01.value for key, value in input_data: if re.match('^\s*\[\s*import\s*\]\s*', key.lower()): currJsonPath = self.jsonPath @@ -278,7 +277,6 @@ def __processImportFiles(self, input_data : dict) -> dict: self.lImportedFiles = self.lImportedFiles[:self.recursive_level] if self.masterFile is not None else \ self.lImportedFiles[:self.recursive_level-1] if abs_path_file in self.lImportedFiles: - # self.__reset() raise Exception(f"Cyclic imported json file '{abs_path_file}'!") oJsonImport = self.jsonLoad(abs_path_file) @@ -297,8 +295,10 @@ def __processImportFiles(self, input_data : dict) -> dict: specialCharacters = r'$[]{}' tmpOutdict = copy.deepcopy(out_dict) for k1, v1 in tmpOutdict.items(): + sCheckDupKey = '' # Uses to track an absolute path of overwritten parameter in case it's duplicate to others. keyPattern = re.escape(k1) pattern2 = rf'\${{\s*[^{re.escape(specialCharacters)}]*\.*' + keyPattern + r'\s*}$|\[\s*\'' + keyPattern + r'\'\s*\]$' + bCheck = False if re.search(pattern2, key, re.UNICODE): bCheck = True tmpKey = self.__multipleReplace(key, {"${":"", "}":""}) @@ -315,6 +315,7 @@ def __processImportFiles(self, input_data : dict) -> dict: sExec = "self.jsonCheck" for item in items: sExec = sExec + f"['{item}']" + sCheckDupKey = sCheckDupKey + f"[{item}]" try: exec(f"dumpData = {sExec}") except: @@ -331,17 +332,23 @@ def __processImportFiles(self, input_data : dict) -> dict: for k in listKeys: tmpDict[k] = index if k==newKey else out_dict[k] out_dict = tmpDict - if isinstance(out_dict[key], list): - if out_dict[key][0] != CNameMangling.DUPLICATEDKEY_01.value: - tmpValue = [CNameMangling.DUPLICATEDKEY_01.value, out_dict[key], value] + if sCheckDupKey!='': + sCheckElement = sCheckElement + f"({sCheckDupKey})" # Adds absolute path to the check element while + elif bCheck: # handling duplicate keys later + sCheckElement = sCheckElement + f"(None)" # Adds "(None)" in case no absolute path is detected in + if isinstance(out_dict[key], list): # a duplicated key. + if CNameMangling.DUPLICATEDKEY_01.value not in out_dict[key][0]: + tmpValue = [sCheckElement, out_dict[key], value] del out_dict[key] else: tmpValue = out_dict[key] tmpValue.append(value) del out_dict[key] else: - tmpValue = [CNameMangling.DUPLICATEDKEY_01.value, out_dict[key], value] + tmpValue = [sCheckElement, out_dict[key], value] del out_dict[key] + if sCheckElement!=tmpValue[0]: + tmpValue[0] = sCheckElement value = tmpValue out_dict[key] = value del tmpOutdict @@ -529,6 +536,7 @@ def __getNestedValue(sNestedParam : str): tmpValue = ldict['value'] except Exception as error: self.__reset() + sNestedParam = self.__removeTokenStr(sNestedParam) errorMsg = '' for errorType in self.pythonTypeError: if errorType in str(error): @@ -556,7 +564,7 @@ def __getNestedValue(sNestedParam : str): sVar = self.__handleDotInNestedParam(var) sInputStr = sInputStr.replace(var, sVar) tmpPattern = pattern + rf'(\[\s*\d+\s*\]|\[\s*\'[^{re.escape(specialCharacters)}]+\'\s*\])*' - sNestedParam = sInputStr.replace("$$", "$") + sNestedParam = self.__removeTokenStr(sInputStr.replace("$$", "$")) if "." in sInputStr and not bConvertToStr: sInputStr = self.__handleDotInNestedParam(sInputStr) while re.search(tmpPattern, sInputStr, re.UNICODE) and sInputStr.count("$$")>1: @@ -569,6 +577,7 @@ def __getNestedValue(sNestedParam : str): tmpValue = __getNestedValue(sVar) if (isinstance(tmpValue, list) or isinstance(tmpValue, dict)) and bConvertToStr: self.__reset() + sVar = self.__removeTokenStr(sVar) raise Exception(f"The substitution of parameter '{sVar.replace('$$', '$')}' inside the string \ value '{sNestedParam}' is not supported! Composite data types like lists and dictionaries cannot \ be substituted inside strings.") @@ -579,6 +588,7 @@ def __getNestedValue(sNestedParam : str): if re.search(r"\[\s*'\s*" + varPattern + r"\s*'\s*\]", sInputStr): if (isinstance(tmpValue, list) or isinstance(tmpValue, dict)): self.__reset() + sVar = self.__removeTokenStr(sVar) raise Exception(f"The substitution of parameter '{sVar.replace('$$', '$')}' inside \ the expression '{sNestedParam}' is not supported! Composite data types like lists and dictionaries cannot be substituted as strings.") sInputStr = re.sub(r"\[\s*'\s*" + varPattern + r"\s*'\s*\]", "['" + str(tmpValue) + "']", sInputStr) @@ -590,6 +600,7 @@ def __getNestedValue(sNestedParam : str): var = var[0].replace("$$", "$") sParentParam = re.search(r'^\s*(.+)\[[\s\']*' + varPattern + r'.*$', sInputStr)[1] parentValue = None + var = self.__removeTokenStr(var) try: parentValue = __getNestedValue(sParentParam) except Exception as error: @@ -664,6 +675,7 @@ def __getNestedValue(sNestedParam : str): if bConvertToStr and (isinstance(tmpValue, list) or isinstance(tmpValue, dict)): dataType = re.sub(r"^.+'([a-zA-Z]+)'.*$", "\\1", str(type(tmpValue))) self.__reset() + sVar = self.__removeTokenStr(sVar) raise Exception(f"The substitution of parameter '{sVar.replace('$$', '$')}' inside the string \ value '{sNestedParam}' is not supported! Composite data types like lists and dictionaries cannot \ be substituted inside strings.") @@ -807,10 +819,10 @@ def __checkAndCreateNewElement(self, sKey: str, value, oJson=None, bCheck=False, for eType in self.pythonTypeError: if eType in str(error): if keyNested is not None: - errorMsg = f"Could not set parameter '{keyNested}' with value '{value}'! \ + errorMsg = f"Could not set parameter '{self.__removeTokenStr(keyNested)}' with value '{value}'! \ Reason: {str(error).replace(' or slices', '')}" else: - errorMsg = f"Could not set parameter '{sKey}' with value '{value}'! \ + errorMsg = f"Could not set parameter '{self.__removeTokenStr(sKey)}' with value '{value}'! \ Reason: {str(error).replace(' or slices', '')}" self.__reset() raise Exception(errorMsg) @@ -829,7 +841,7 @@ def __checkAndCreateNewElement(self, sKey: str, value, oJson=None, bCheck=False, except Exception as error: self.__reset() if keyNested is not None: - sKey = keyNested + sKey = self.__removeTokenStr(keyNested) errorMsg = f"Could not set parameter '{sKey}' with value '{value}'! Reason: {error}" raise Exception(errorMsg) return True @@ -891,7 +903,6 @@ def __jsonUpdated(k, v, oJson, parentParams, keyNested, paramValue, bDuplicatedH sExecKey = sExecKey + f"[{element}]" else: sExecKey= sExecKey + f"['{element}']" - bKeyName = False if keyNested is not None: if not bDuplicatedHandle and keyNested in oJson.keys(): del oJson[keyNested] @@ -911,44 +922,47 @@ def __jsonUpdated(k, v, oJson, parentParams, keyNested, paramValue, bDuplicatedH k = re.sub(CNameMangling.AVOIDDATATYPE.value, "", k) lElements = self.__parseDictPath(k) sExecKey1 = "self.JPGlobals" - sExecKey2 = "oJson" for element in lElements: if re.match(r"^[\s\-]*\d+$", element) or re.match(r"^'[^']+'$", element.strip()): - if '[' in sExecKey2: - sExecKey2 = sExecKey2 + f"[{element}]" - elif element.strip("'") in list(oJson.keys()): - sExecKey2 = sExecKey2 + f"[{element}]" sExecKey1 = sExecKey1 + f"[{element}]" else: - if '[' in sExecKey2: - sExecKey2 = sExecKey2 + f"['{element}']" - elif element.strip("'") in list(oJson.keys()): - sExecKey2 = sExecKey2 + f"['{element}']" sExecKey1 = sExecKey1 + f"['{element}']" if paramValue is None: sExec1 = sExecKey1 + f" = \"{v}\"" if isinstance(v, str) else sExecKey1 + f" = {str(v)}" - sExec2 = sExecKey2 + f" = \"{v}\"" if isinstance(v, str) else sExecKey2 + f" = {str(v)}" else: sExec1 = sExecKey1 + ' = ' + sExecValue1 - sExec2 = sExecKey2 + ' = ' + sExecValue1 try: exec(sExec1) - exec(sExec2) except Exception as error: self.__reset() - errorMsg = f"Could not set parameter '{keyNested}' with value '{v}'! Reason: {error}" + errorMsg = f"Could not set parameter '{self.__removeTokenStr(keyNested)}' with value '{v}'! Reason: {error}" raise Exception(errorMsg) + if parentParams != '': + jsonParam = re.sub(rf'^{re.escape(parentParams)}(.+)$', '\\1', k) + jsonParam = re.sub(r'^\[([^\[]+)\].*$', '\\1', jsonParam) + TmpParentParams = re.sub(r'^([^\[]+)', '[\'\\1\']', parentParams) + sExec = f"oJson[{jsonParam}] = self.JPGlobals{TmpParentParams}[{jsonParam}]" + try: + exec(sExec) + except Exception as error: + raise Exception(f"Could not set root key element '{parentParams}[{jsonParam}]'! Reason: {error}") if not recursive: oJson[rootKey] = self.JPGlobals[rootKey] - else: - bKeyName = True else: - bKeyName = True - if bKeyName: if CNameMangling.AVOIDDATATYPE.value in k: k = re.sub(CNameMangling.AVOIDDATATYPE.value, "", k) if paramValue is None: oJson[k] = v + if parentParams == '': + self.JPGlobals[k] = v + else: + TmpParentParams = re.sub(r'^([^\[]+)', '[\'\\1\']', parentParams) + sExec = f"self.JPGlobals{TmpParentParams}['{k}'] = {v}" if not isinstance(v, str) else \ + f"self.JPGlobals{TmpParentParams}['{k}'] = \"{v}\"" + try: + exec(sExec) + except: + pass else: sExec1 = f"{sExecKey} = {sExecValue1}" sExec2 = f"oJson['{k}'] = {sExecValue2}" @@ -957,7 +971,7 @@ def __jsonUpdated(k, v, oJson, parentParams, keyNested, paramValue, bDuplicatedH exec(sExec2) except Exception as error: self.__reset() - errorMsg = f"Could not set parameter '{k}'! Reason: {error}" + errorMsg = f"Could not set parameter '{self.__removeTokenStr(k)}'! Reason: {error}" raise Exception(errorMsg) if not recursive: self.JPGlobals.update({k:v}) @@ -993,13 +1007,13 @@ def __handleList(lInput : list, bNested : bool) -> list: item = __loadNestedValue(initItem, item) if item==sLoopCheck: self.__reset() - raise Exception(f"Invalid expression found: '{initItem}'.") + raise Exception(f"Invalid expression found: '{self.__removeTokenStr(initItem)}'.") elif isinstance(item, list) and "${" in str(item): item = __handleList(item, bNested) elif isinstance(item, dict): tmpItem = copy.deepcopy(item) for key, value in tmpItem.items(): - if isinstance(value, list) and value[0]==CNameMangling.DUPLICATEDKEY_01.value: + if isinstance(value, list) and CNameMangling.DUPLICATEDKEY_01.value in str(value[0]): item[key] = value[-1] if CNameMangling.DUPLICATEDKEY_01.value in key: item.pop(key) @@ -1010,10 +1024,15 @@ def __handleList(lInput : list, bNested : bool) -> list: return tmpValue if bool(self.currentCfg) and not recursive: - for k, v in self.currentCfg.items(): + tmpDict = copy.deepcopy(self.currentCfg) + for k, v in tmpDict.items(): if k in self.lDataTypes: + oldKey = k k = CNameMangling.AVOIDDATATYPE.value + k + self.__changeDictKey(self.currentCfg, oldKey, k) self.JPGlobals.update({k:v}) + del tmpDict + oJson = self.currentCfg | oJson tmpJson = copy.deepcopy(oJson) pattern = rf"\${{\s*[^\[]+\s*}}" @@ -1050,7 +1069,7 @@ def __handleList(lInput : list, bNested : bool) -> list: k = __loadNestedValue(keyNested, k, bKey=True, key=keyNested) if k == sLoopCheck: self.__reset() - raise Exception(f"Invalid expression found: '{keyNested}'.") + raise Exception(f"Invalid expression found: '{self.__removeTokenStr(keyNested)}'.") elif re.match(r"^\s*" + pattern + r"\s*$", k, re.UNICODE): bCheckDynamicKey = False keyNested = k @@ -1090,7 +1109,7 @@ def __handleList(lInput : list, bNested : bool) -> list: exec(sExec) except: self.__reset() - raise Exception(f"A key with name '{keyNested}' does not exist at this position. \ + raise Exception(f"A key with name '{self.__removeTokenStr(keyNested)}' does not exist at this position. \ Use the ' : ' syntax to create a new key.") elif bCheckDynamicKey: sExec = sExec + re.sub(r'^\s*([^\[]+)', "['\\1']", parentParams) + \ @@ -1100,14 +1119,24 @@ def __handleList(lInput : list, bNested : bool) -> list: except Exception as error: if isinstance(error, KeyError): self.__reset() - raise Exception(f"Identified dynamic name of key '{keyNested}' that does not exist. But new keys can \ -only be created based on hard code names.") + raise Exception(f"Identified dynamic name of key '{self.__removeTokenStr(keyNested)}' that does not exist. \ +But new keys can only be created based on hard code names.") else: pass + elif parentParams == '' and not re.search(r'\[[^\]]+\]', k): + sExec = sExec + f"['{k}']" + try: + exec(sExec) + except Exception as error: + if isinstance(error, KeyError): + raise Exception(f"Could not resolve expression '${{{k}}}'. The based parameter '{k}' is not defined yet! \ +Use the ' : ' syntax to create a new based parameter.") + else: + raise Exception(f"Could not resolve expression '${{{k}}}'. Reason: {error}") if bImplicitCreation and not self.__checkAndCreateNewElement(k, v, bCheck=True, keyNested=keyNested): self.__reset() raise Exception(f"The implicit creation of data structures based on parameters is not supported \ -(affected expression: '{keyNested}').") +(affected expression: '{self.__removeTokenStr(keyNested)}').") paramInValue = None if isinstance(v, dict): v, bNested = self.__updateAndReplaceNestedParam(v, bNested, recursive=True, parentParams=parentParams) @@ -1126,7 +1155,7 @@ def __handleList(lInput : list, bNested : bool) -> list: v = __loadNestedValue(initValue, v) if v == sLoopCheck: self.__reset() - raise Exception(f"Invalid expression found: '{initValue}'.") + raise Exception(f"Invalid expression found: '{self.__removeTokenStr(initValue)}'.") if isinstance(v, str) and re.search(r'\[[^\]]+\]', v): sExec = 'value = ' + v try: @@ -1241,43 +1270,40 @@ def __checkNestedParam(self, sInput : str, bKey=False, bCheckKeyName=False) -> b errorMsg = None # Start checking nested parameter if re.search(rf"\${{\s*[^{re.escape(self.specialCharacters)}]+\['*.+'*\].*}}", sInput, re.UNICODE): - if CNameMangling.STRINGCONVERT.value in sInput: - sInput = sInput.replace(CNameMangling.STRINGCONVERT.value, "") - errorMsg = f"Invalid syntax: Found index or sub-element inside curly brackets in the parameter '{sInput}'" + errorMsg = f"Invalid syntax: Found index or sub-element inside curly brackets in \ +the parameter '{self.__removeTokenStr(sInput)}'" elif re.search(r"\[[0-9\s]*[A-Za-z_]+[0-9\s]*\]", sInput, re.UNICODE): invalidElem = re.search(r"\[([0-9\s]*[A-Za-z_]+[0-9\s]*)\]", sInput, re.UNICODE)[1] - errorMsg = f"Invalid syntax! Sub-element '{invalidElem}' in {sInput.replace(CNameMangling.STRINGCONVERT.value, '').strip()} \ + errorMsg = f"Invalid syntax! Sub-element '{invalidElem}' in {self.__removeTokenStr(sInput)} \ need to be referenced using ${{{invalidElem}}} or enclosed in quotes ['{invalidElem}']." elif re.search(r'\[[!@#\$%\^&\*\(\)=\[\]|;\s\-\+\'",<>?/`~]*\]', sInput): if CNameMangling.STRINGCONVERT.value not in sInput or \ re.match(pattern, sInput.replace(CNameMangling.STRINGCONVERT.value, "")): - errorMsg = f"Expression '{sInput.replace(CNameMangling.STRINGCONVERT.value, '')}' cannot be evaluated. \ + errorMsg = f"Expression '{self.__removeTokenStr(sInput)}' cannot be evaluated. \ Reason: A pair of square brackets is empty or contains not allowed characters." elif bSpecialCharInParam: if CNameMangling.STRINGCONVERT.value not in sInput: - errorMsg = f"Expression '{sInput.replace(CNameMangling.STRINGCONVERT.value, '')}' cannot be evaluated. \ + errorMsg = f"Expression '{self.__removeTokenStr(sInput)}' cannot be evaluated. \ Reason: A pair of curly brackets is empty or contains not allowed characters." elif re.search(pattern2, sInput) or re.search(r"\[\s*\-\s*\d+\s*\]", sInput): - if CNameMangling.STRINGCONVERT.value in sInput: - sInput = sInput.replace(CNameMangling.STRINGCONVERT.value, '') - errorMsg = f"Slicing is not supported (expression: '{sInput}')." + errorMsg = f"Slicing is not supported (expression: '{self.__removeTokenStr(sInput)}')." elif sInput.count("${") > sInput.count("}") and (CNameMangling.STRINGCONVERT.value in sInput or \ re.match(r"^[\s\"]*\${[^!@#%\^&\*\(\)=|;,<>?/`~]+[\s\"]*$", sInput)): - sInput = re.sub(CNameMangling.STRINGCONVERT.value, "", sInput) - errorMsg = f"Invalid syntax! One or more than one closed curly bracket is missing in expression '{sInput.strip()}'." + errorMsg = f"Invalid syntax! One or more than one closed curly bracket is missing in \ +expression '{self.__removeTokenStr(sInput.strip())}'." elif not re.match(r"^\${.+[}\]]+$", sInput) or (re.search(pattern1, sInput) and not bKey): if CNameMangling.STRINGCONVERT.value not in sInput and CNameMangling.DUPLICATEDKEY_01.value not in sInput: sTmpInput = re.sub(r"(\.\${[a-zA-Z0-9\.\_]+}(\[[^\[]+\])*)", "", sInput) if not re.match(r"^\s*\${[a-zA-Z0-9\.\_]+}(\[[^\[]+\])*\s*$", sTmpInput): - errorMsg = f"Invalid expression found: '{sInput}' - The double quotes are missing!!!" + errorMsg = f"Invalid expression found: '{self.__removeTokenStr(sInput)}' - The double quotes are missing!!!" elif CNameMangling.STRINGCONVERT.value in sInput: sInput = sInput.replace(CNameMangling.STRINGCONVERT.value, '') if re.match(r'^\${[^}]+}+(\[+[^\]]+\]+)*$', sInput) and \ (sInput.count("${") != sInput.count("}") or sInput.count("[") != sInput.count("]")): - errorMsg = f"Invalid expression found: '{sInput.strip()}' - The brackets mismatch!!!" + errorMsg = f"Invalid expression found: '{self.__removeTokenStr(sInput.strip())}' - The brackets mismatch!!!" elif sInput.count("${") != sInput.count("}") or sInput.count("[") != sInput.count("]"): if CNameMangling.STRINGCONVERT.value not in sInput: - errorMsg = f"Invalid expression found: '{sInput.strip()}' - The brackets mismatch!!!" + errorMsg = f"Invalid expression found: '{self.__removeTokenStr(sInput.strip())}' - The brackets mismatch!!!" # End checking nested parameter if errorMsg is not None: self.__reset() @@ -1332,17 +1358,25 @@ def __keyNameValidation(self, sInput): *No return value* """ - checkPattern = re.compile(re.escape(self.specialCharacters)) + def __isAscii(sInput : str) -> bool: + try: + sInput.encode('ascii') + return True + except UnicodeEncodeError: + return False + errorMsg = '' if CNameMangling.STRINGCONVERT.value in sInput: - sInput = sInput.replace(CNameMangling.STRINGCONVERT.value, '') - errorMsg = f"A substitution in key names is not allowed! Please update the key name {sInput}" + errorMsg = f"A substitution in key names is not allowed! Please update the key name {self.__removeTokenStr(sInput)}" + sInput = self.__removeTokenStr(sInput) + if errorMsg!='': + pass elif '${' not in sInput and not re.match(r'^\s*"\[\s*import\s*\]"\s*$', sInput.lower()): - if re.match(r'^[\s"]*[\+\-\*:@' + re.escape(self.specialCharacters) + ']+.*$', sInput): - errorMsg = f"Invalid key name: {sInput}. Key names have to start with a character, digit or underscore." - elif checkPattern.search(sInput): + if not re.match(r'^[\s"]*[a-zA-Z0-9_]+.*$', sInput) and __isAscii(sInput): + errorMsg = f"Invalid key name: {sInput}. Key names have to start with a letter, digit or underscore." + elif re.search(rf'[{re.escape(self.specialCharacters)}]', sInput): errorMsg = f"Invalid key name: {sInput}. Key names must not contain these special characters \"{self.specialCharacters}\" \ -and have to start with a character, digit or underscore." +and have to start with a letter, digit or underscore." elif re.search(r'\${[^}]*}', sInput): if re.search(r'\[\s*\]', sInput): errorMsg = f"Invalid key name: {sInput}. A pair of square brackets is empty!!!" @@ -1350,19 +1384,21 @@ def __keyNameValidation(self, sInput): tmpStr = sInput while re.search(r'\${([^}]*)}', tmpStr): param = re.search(r'\${([^}\$]*)}', tmpStr) + if param is None and re.search(r'\${.*\$(?!\{).*}', tmpStr): + param = re.search(r'\${([^}]*)}', tmpStr) if param is not None: if param[1].strip() == '': errorMsg = f"Invalid key name: {sInput}. A pair of curly brackets is empty!!!" break - elif re.match(r'^[\+\-\*:@' + re.escape(self.specialCharacters) + ']+.*$', param[1]): - errorMsg = f"Invalid key name: {sInput}. Key names have to start with a character, digit or underscore." + elif not re.match(r'^[a-zA-Z0-9_]+.*$', param[1].strip()) and __isAscii(param[1].strip()): + errorMsg = f"Invalid key name: {sInput}. Key names have to start with a letter, digit or underscore." break elif re.search(r'^.+\[.+\]$', param[1].strip()): errorMsg = f"Invalid syntax: Found index or sub-element inside curly brackets in the parameter '{sInput}'" break - elif checkPattern.search(param[1]): + elif re.search(rf'[{re.escape(self.specialCharacters)}]', param[1]): errorMsg = f"Invalid key name: '{param[1]}' in {sInput}. Key names must not contain these special characters \"{self.specialCharacters}\" \ -and have to start with a character, digit or underscore." +and have to start with a letter, digit or underscore." break else: nestedParam = param[0] @@ -1372,6 +1408,26 @@ def __keyNameValidation(self, sInput): self.__reset() raise Exception(errorMsg) + def __removeTokenStr(self, sInput : str) -> str: + ''' +Checks and removes reserved tokens which are added while handling a content of JSONP files. +**Arguments:** + +* ``sInput`` + + / *Condition*: required / *Type*: str / + +**Returns:** + +* ``sInput`` + + / *Type*: str / + ''' + for tokenStr in CNameMangling: + if tokenStr.value in sInput: + sInput = sInput.replace(tokenStr.value, '') + return sInput + def jsonLoad(self, jFile : str): """ This method is the entry point of JsonPreprocessor. @@ -1439,7 +1495,7 @@ def jsonLoads(self, sJsonpContent : str, referenceDir : str = ''): Preprocessed JSON content as Python dictionary """ - def __handleDuplicatedKey(dInput : dict) -> dict: + def __handleDuplicatedKey(dInput : dict, parentParams : str = '') -> dict: listKeys = list(dInput.keys()) dictValues = {} for key in listKeys: @@ -1447,18 +1503,31 @@ def __handleDuplicatedKey(dInput : dict) -> dict: origKey = re.sub(CNameMangling.DUPLICATEDKEY_01.value + "\d+\s*$", "", key) dictValues[origKey] = copy.deepcopy(dInput[origKey]) for key in dictValues.keys(): - dInput = self.__changeDictKey(dInput, key, key + CNameMangling.DUPLICATEDKEY_01.value + "00") + dInput = self.__changeDictKey(dInput, key, key + CNameMangling.DUPLICATEDKEY_00.value) tmpDict = copy.deepcopy(dInput) for k, v in tmpDict.items(): if CNameMangling.DUPLICATEDKEY_01.value in k: origK = re.sub(CNameMangling.DUPLICATEDKEY_01.value + "\d+\s*$", "", k) dInput[k] = dictValues[origK].pop(1) if isinstance(v, list): - if len(v)>0 and v[0]==CNameMangling.DUPLICATEDKEY_01.value: + if len(v)>0 and CNameMangling.DUPLICATEDKEY_01.value in str(v[0]): + # Checks the format of the overwritten parameter + lOverwritten = re.findall(r'\(([^\(]+)\)', v[0]) # Gets absolute paths of duplicated keys from first element. + for item in lOverwritten: + if item=='None' and parentParams!='': # Raise exception if an absolute path is not provided. + self.__reset() + formatOverwritten1 = re.sub(r'^\[([^\[]+)\]', '${\\1}', parentParams) + formatOverwritten1 = formatOverwritten1 + f"['{origK}']" + formatOverwritten2 = self.__multipleReplace(parentParams, {"]['" : ".", "']['" : ".", "[" : "", "']" : ""}) + formatOverwritten2 = "${" + formatOverwritten2 + f".{origK}}}" + raise Exception(f"Missing scope for parameter '${{{origK}}}'. To change the value of this parameter, \ +an absolute path must be used: '{formatOverwritten1}' or '{formatOverwritten2}'.") v = v[-1] dInput[k] = v + parentParams = f"[{k}]" if parentParams=='' else parentParams + f"['{k}']" if isinstance(v, dict): - dInput[k] = __handleDuplicatedKey(v) + dInput[k] = __handleDuplicatedKey(v, parentParams=parentParams) + parentParams = re.sub(rf"\['*{re.escape(k)}'*\]$", '', parentParams) del tmpDict del dictValues return dInput @@ -1507,6 +1576,9 @@ def __handleLastElement(sInput : str) -> str: sInput = sInput.replace(sParam, '"' + sParam + '"') return sInput + if not isinstance(sJsonpContent, str): + self.__reset() + raise Exception(f'Expected a string, but got a value of type {type(sJsonpContent)}') # Identifies the entry level when loading JSONP content in comparison with imported files levels. firstLevel = True if self.recursive_level==0 else False if referenceDir != '': @@ -1522,6 +1594,12 @@ def __handleLastElement(sInput : str) -> str: raise Exception(f"Could not read JSONP content due to: '{reason}'!") else: sJsonData = sJsonpContent + # Checking: Do token strings which are reserved in CNameMangling present jsonp file. + lReservedTokens = [tokenStr.value for tokenStr in CNameMangling] + for reservedToken in lReservedTokens: + if reservedToken in sJsonData: + self.__reset() + raise Exception(f"The JSONP content contains a reserved token '{reservedToken}'") sJsonDataUpdated = "" lNestedParams = [] for line in sJsonData.splitlines(): @@ -1538,6 +1616,8 @@ def __handleLastElement(sInput : str) -> str: while re.search(r'\${([^}]*)}', line): tmpLine = line param = re.search(r'\${([^}\$]*)}', line) + if param is None and re.search(r'\${.*\$(?!\{).*}', line): + param = re.search(r'\${([^}]*)}', line) if param is not None: lNestedParams.append(param[0]) if ':' in param[1]: @@ -1553,6 +1633,7 @@ def __handleLastElement(sInput : str) -> str: line = re.sub(slicingPattern, CNameMangling.SLICEINDEX.value, line) tmpList03 = [] indexPattern = r"\[[\s\-\+\d]*\]" + indexList = [] if re.search(indexPattern, line): indexList = re.findall(indexPattern, line) line = re.sub("(" + indexPattern + ")", CNameMangling.LISTINDEX.value, line) @@ -1566,7 +1647,7 @@ def __handleLastElement(sInput : str) -> str: while CNameMangling.COLONS.value in item: item = item.replace(CNameMangling.COLONS.value, tmpList01.pop(0), 1) if CNameMangling.LISTINDEX.value in item: - while CNameMangling.LISTINDEX.value in item: + while CNameMangling.LISTINDEX.value in item and len(indexList)>0: item = item.replace(CNameMangling.LISTINDEX.value, indexList.pop(0), 1) if CNameMangling.SLICEINDEX.value in item: while CNameMangling.SLICEINDEX.value in item: @@ -1631,11 +1712,6 @@ def __handleLastElement(sInput : str) -> str: newLine = newLine + item + " :" if item=='' else newLine + item preItem = curItem i+=1 - for nestedParam in self.lNestedParams: - tmpNestedParam = re.escape(nestedParam) - if re.search(r"(\s*\"str\(" + tmpNestedParam + "\)\"\s*:)", newLine.replace(CNameMangling.STRINGCONVERT.value, '')) \ - or re.search(r"(\s*\"" + tmpNestedParam + r"\"\s*:)", newLine.replace(CNameMangling.STRINGCONVERT.value, '')): - self.lNestedParams.remove(nestedParam) if re.search(r"\[\s*\+\s*\d+\s*\]", newLine): newLine = re.sub(r"\[\s*\+\s*(\d+)\s*\]", "[\\1]", newLine) sJsonDataUpdated = sJsonDataUpdated + newLine + "\n" @@ -1706,29 +1782,6 @@ def __handleLastElement(sInput : str) -> str: __checkKeynameFormat(oJson) oJson, bNested = self.__updateAndReplaceNestedParam(oJson) self.jsonCheck = {} - for k, v in self.dUpdatedParams.items(): - if '[' in k: - rootElement = k.split('[', 1)[0] - if rootElement in oJson: - self.__checkAndCreateNewElement(k, v) - sExec = "oJson['" + rootElement + "'] = " + rootElement - try: - exec(sExec) - except: - pass - if isinstance(v, str): - sExec = "oJson['" + k.split('[', 1)[0] + "'][" + k.split('[', 1)[1] + " = \"" + v + "\"" - else: - sExec = "oJson['" + k.split('[', 1)[0] + "'][" + k.split('[', 1)[1] + " = " + str(v) - else: - if isinstance(v, str): - sExec = "oJson['" + k + "'] = \"" + v + "\"" - else: - sExec = "oJson['" + k + "'] = " + str(v) - try: - exec(sExec) - except: - pass self.__reset() __removeDuplicatedKey(oJson) diff --git a/JsonPreprocessor/JsonPreprocessor.pdf b/JsonPreprocessor/JsonPreprocessor.pdf index ae8a198b..0495713b 100644 Binary files a/JsonPreprocessor/JsonPreprocessor.pdf and b/JsonPreprocessor/JsonPreprocessor.pdf differ diff --git a/JsonPreprocessor/version.py b/JsonPreprocessor/version.py index 2806283c..0c8f38a7 100644 --- a/JsonPreprocessor/version.py +++ b/JsonPreprocessor/version.py @@ -18,6 +18,6 @@ # # Version and date of JsonPreprocessor # -VERSION = "0.8.0" -VERSION_DATE = "12.08.2024" +VERSION = "0.8.1" +VERSION_DATE = "28.10.2024" diff --git a/atest/testdata/templates.py b/atest/testdata/templates.py index 30df8731..c2d531a6 100644 --- a/atest/testdata/templates.py +++ b/atest/testdata/templates.py @@ -413,8 +413,7 @@ "testcase_06a": "JsonPreprocessor", "testcase_06b": { "globalFloatParam": 97, - "gCheck01": 12, - "globalIntParam": 69 + "gCheck01": 12 }, "testcase_06c": 23, "testcase_06d": { diff --git a/config/robotframework_aio/release_items_JsonPreprocessor.json b/config/robotframework_aio/release_items_JsonPreprocessor.json index 4c99a686..08fb7da9 100644 --- a/config/robotframework_aio/release_items_JsonPreprocessor.json +++ b/config/robotframework_aio/release_items_JsonPreprocessor.json @@ -105,7 +105,7 @@ " ] , - "0.12.1.;0.13.0." : [ + "0.12.1.;0.13.0.;0.13.1." : [ " * Changed data type of return value @@ -145,6 +145,21 @@ Valid key names are: ``\"abcParam\"``, ``\"01_Param\"``, ``\"__param+1\"``, ``\"param-1\"``, ``\"abc@jpp.com\"``, ... Invalid key names are: ``\"+param01\"``, ``\"param$01\"``, ``\"abc#Param\"``, ... + +* Checked absolute path when overwriting parameter + + When overwriting a parameter, the absolute path of the parameter must be provided + + **Example:** + + |``\u007b`` + | ``\"params\" : \u007b\"001\" : \u007b\"002\" : \u007b`` + | ``\"param\" : 1,`` + | ``$\u007bparams.001.002.param\u007d : 2`` + | ``\u007d`` + | ``\u007d`` + | ``\u007d`` + |``\u007d`` " ] } diff --git a/packagedoc/additional_docs/History.tex b/packagedoc/additional_docs/History.tex index e0b31933..4a22a006 100644 --- a/packagedoc/additional_docs/History.tex +++ b/packagedoc/additional_docs/History.tex @@ -80,4 +80,10 @@ - Fixed issues related to error handling deviation\newline - Updated error messages log} +\historyversiondate{0.8.1}{10/2024} +\historychange{- Fixed issues related to the naming convention check for key name\newline +- Improved implicit creation feature\newline +- Prevented side effects of token string in error messages log\newline +- Checked absolute path when overwriting parameter} + \end{packagehistory} diff --git a/test/JPP_TestUsecases.csv b/test/JPP_TestUsecases.csv index f1377b55..52d6dca9 100644 --- a/test/JPP_TestUsecases.csv +++ b/test/JPP_TestUsecases.csv @@ -10,34 +10,35 @@ JPP_0101|DATA_INTEGRITY|GOODCASE|JSON file with string containing several separa JPP_0102|DATA_INTEGRITY|GOODCASE|JSON file with string containing more special characters, masked special characters and escape sequences JPP_0103|DATA_INTEGRITY|GOODCASE|JSON file with strings containing several pairs of square brackets (that must not cause syntax issues!) JPP_0200|PARAMETER_SUBSTITUTION|GOODCASE|JSON file with nested parameter / string parameter substitution in parameter value -JPP_0201|PARAMETER_SUBSTITUTION|GOODCASE|JSON file with nested parameter / string parameter substitution in parameter name -JPP_0202|PARAMETER_SUBSTITUTION|GOODCASE|JSON file with nested parameter / index parameter substitution in parameter name / standard notation -JPP_0203|PARAMETER_SUBSTITUTION|GOODCASE|JSON file with nested parameter / index parameter substitution in parameter name / dotdict notation -JPP_0204|PARAMETER_SUBSTITUTION|GOODCASE|JSON file with nested parameter / index parameter substitution in parameter value / standard notation -JPP_0205|PARAMETER_SUBSTITUTION|GOODCASE|JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation -JPP_0206|PARAMETER_SUBSTITUTION|GOODCASE|JSON file with nested parameter / key parameter substitution in parameter name / standard notation -JPP_0207|PARAMETER_SUBSTITUTION|GOODCASE|JSON file with nested parameter / key parameter substitution in parameter name / dotdict notation -JPP_0208|PARAMETER_SUBSTITUTION|GOODCASE|JSON file with nested parameter / key parameter substitution in parameter value / standard notation -JPP_0209|PARAMETER_SUBSTITUTION|GOODCASE|JSON file with nested parameter / key parameter substitution in parameter value / dotdict notation +JPP_0201|PARAMETER_SUBSTITUTION|GOODCASE|JSON file with nested parameter / index parameter substitution in parameter value / standard notation +JPP_0202|PARAMETER_SUBSTITUTION|GOODCASE|JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation +JPP_0203|PARAMETER_SUBSTITUTION|GOODCASE|JSON file with nested parameter / key parameter substitution in parameter value / standard notation +JPP_0204|PARAMETER_SUBSTITUTION|GOODCASE|JSON file with nested parameter / key parameter substitution in parameter value / dotdict notation JPP_0250|PARAMETER_SUBSTITUTION|BADCASE|JSON file with nested parameter / string parameter substitution in parameter value / innermost parameter not existing -JPP_0251|PARAMETER_SUBSTITUTION|BADCASE|JSON file with nested parameter / string parameter substitution in parameter name / in between parameter not existing -JPP_0252|PARAMETER_SUBSTITUTION|BADCASE|JSON file with nested parameter / index parameter substitution in parameter name / standard notation / index parameter not existing -JPP_0253|PARAMETER_SUBSTITUTION|BADCASE|JSON file with nested parameter / index parameter substitution in parameter name / dotdict notation / index parameter not existing -JPP_0254|PARAMETER_SUBSTITUTION|BADCASE|JSON file with nested parameter / index parameter substitution in parameter value / standard notation / index parameter not existing -JPP_0255|PARAMETER_SUBSTITUTION|BADCASE|JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation / index parameter not existing -JPP_0256|PARAMETER_SUBSTITUTION|BADCASE|JSON file with nested parameter / key parameter substitution in parameter name / standard notation / variant number not existing -JPP_0257|PARAMETER_SUBSTITUTION|BADCASE|JSON file with nested parameter / key parameter substitution in parameter name / dotdict notation / milestone number not existing -JPP_0258|PARAMETER_SUBSTITUTION|BADCASE|JSON file with nested parameter / key parameter substitution in parameter value / standard notation / variant number not existing -JPP_0259|PARAMETER_SUBSTITUTION|BADCASE|JSON file with nested parameter / key parameter substitution in parameter value / dotdict notation / milestone number not existing -JPP_0260|PARAMETER_SUBSTITUTION|BADCASE|JSON file with list parameter substitution in parameter name (composite data types not allowed in names) / (1) -JPP_0261|PARAMETER_SUBSTITUTION|BADCASE|JSON file with list parameter substitution in parameter name (composite data types not allowed in names) / (2) -JPP_0262|PARAMETER_SUBSTITUTION|BADCASE|JSON file with dictionary parameter substitution in parameter name (composite data types not allowed in names) / (1) -JPP_0263|PARAMETER_SUBSTITUTION|BADCASE|JSON file with dictionary parameter substitution in parameter name (composite data types not allowed in names) / (2) -JPP_0264|PARAMETER_SUBSTITUTION|BADCASE|JSON file with list parameter substitution in key name (composite data types not allowed in names) / (1) -JPP_0265|PARAMETER_SUBSTITUTION|BADCASE|JSON file with list parameter substitution in key name (composite data types not allowed in names) / (2) -JPP_0266|PARAMETER_SUBSTITUTION|BADCASE|JSON file with dictionary parameter substitution in key name (composite data types not allowed in names) / (1) -JPP_0267|PARAMETER_SUBSTITUTION|BADCASE|JSON file with dictionary parameter substitution in key name (composite data types not allowed in names) / (2) -JPP_0270|PARAMETER_SUBSTITUTION|BADCASE|JSON file containing a list; list index is defined by a parameter and wrapped in single quotes +JPP_0251|PARAMETER_SUBSTITUTION|BADCASE|JSON file with nested parameter / index parameter substitution in parameter value / standard notation / index parameter not existing +JPP_0252|PARAMETER_SUBSTITUTION|BADCASE|JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation / index parameter not existing +JPP_0253|PARAMETER_SUBSTITUTION|BADCASE|JSON file with nested parameter / key parameter substitution in parameter value / standard notation / variant number not existing +JPP_0254|PARAMETER_SUBSTITUTION|BADCASE|JSON file with nested parameter / key parameter substitution in parameter value / dotdict notation / milestone number not existing +JPP_0255|PARAMETER_SUBSTITUTION|BADCASE|JSON file with substitution of blocked data types inside string values (1) +JPP_0256|PARAMETER_SUBSTITUTION|BADCASE|JSON file with substitution of blocked data types inside string values (2) +JPP_0257|PARAMETER_SUBSTITUTION|BADCASE|JSON file with substitution of blocked data types inside string values (3) +JPP_0258|PARAMETER_SUBSTITUTION|BADCASE|JSON file with substitution of blocked data types inside string values (4) +JPP_0259|PARAMETER_SUBSTITUTION|BADCASE|JSON file with substitution of blocked data types inside string values (5) +JPP_0260|PARAMETER_SUBSTITUTION|BADCASE|JSON file with substitution of blocked data types inside string values (6) +JPP_0261|PARAMETER_SUBSTITUTION|BADCASE|JSON file with substitution of blocked data types inside string values (7) +JPP_0262|PARAMETER_SUBSTITUTION|BADCASE|JSON file with substitution of blocked data types inside string values (8) +JPP_0263|PARAMETER_SUBSTITUTION|BADCASE|JSON file with substitution of blocked data types inside string values (9) +JPP_0264|PARAMETER_SUBSTITUTION|BADCASE|JSON file with blocked dynamic key names (1) +JPP_0265|PARAMETER_SUBSTITUTION|BADCASE|JSON file with blocked dynamic key names (2) +JPP_0266|PARAMETER_SUBSTITUTION|BADCASE|JSON file with blocked dynamic key names (3) +JPP_0267|PARAMETER_SUBSTITUTION|BADCASE|JSON file with blocked dynamic key names (4) +JPP_0268|PARAMETER_SUBSTITUTION|BADCASE|JSON file with blocked dynamic key names (5) +JPP_0269|PARAMETER_SUBSTITUTION|BADCASE|JSON file with blocked dynamic key names (6) +JPP_0270|PARAMETER_SUBSTITUTION|BADCASE|JSON file with blocked dynamic key names (7) +JPP_0271|PARAMETER_SUBSTITUTION|BADCASE|JSON file with blocked dynamic key names (8) +JPP_0272|PARAMETER_SUBSTITUTION|BADCASE|JSON file with blocked dynamic key names (9) +JPP_0273|PARAMETER_SUBSTITUTION|BADCASE|JSON file with blocked dynamic key names (10) +JPP_0274|PARAMETER_SUBSTITUTION|BADCASE|JSON file with blocked dynamic key names (11) JPP_0300|VALUE_DETECTION|GOODCASE|JSON file with parameter of type 'list' / index (in square brackets) defined outside the curly brackets (valid syntax) JPP_0301|VALUE_DETECTION|GOODCASE|JSON file with expression containing more closing elements '}' than opening elements '${' (valid syntax) JPP_0302|VALUE_DETECTION|GOODCASE|JSON file with expression starting with '${' and ending with '}' / no further matching '${' and '}' in between (valid syntax) @@ -65,6 +66,7 @@ JPP_0368|VALUE_DETECTION|BADCASE|JSON file with expression starting with '${' an JPP_0369|VALUE_DETECTION|BADCASE|JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (not all nested) (invalid syntax 3) JPP_0370|VALUE_DETECTION|BADCASE|JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (not all nested) (invalid syntax 4) JPP_0371|VALUE_DETECTION|BADCASE|JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (not all nested) (invalid syntax 5) +JPP_0400|NAMING_CONVENTION|GOODCASE|JSON file with several parameter names w.r.t. the naming convention JPP_0500|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file with composite data structure (nested lists and dictionaries 1) JPP_0501|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file with composite data structure (nested lists and dictionaries 2) JPP_0502|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file with composite data structure (nested lists and dictionaries 3 / some key names with dots inside) @@ -149,3 +151,16 @@ JPP_1700|LINE_BREAKS|GOODCASE|JSON file with and without line breaks inside expr JPP_1800|SELF_ASSIGNMENTS|GOODCASE|JSON file with self assignments of strings, lists and dictionaries JPP_1900|ASSIGNMENTS_BY_REFERENCE|GOODCASE|JSON file with dictionary assignments (by reference) JPP_1901|ASSIGNMENTS_BY_REFERENCE|GOODCASE|JSON file with list assignments (by reference) +JPP_2000|PARAMETER_SCOPE|GOODCASE|JSON file with nested dictionary, in which a parameter is overwritten (1) +JPP_2001|PARAMETER_SCOPE|GOODCASE|JSON file with nested dictionary, in which a parameter is overwritten (2) +JPP_2002|PARAMETER_SCOPE|GOODCASE|JSON file with nested dictionary, in which a parameter is overwritten (3) +JPP_2003|PARAMETER_SCOPE|GOODCASE|JSON file with nested dictionary, in which a parameter is overwritten (4) +JPP_2007|PARAMETER_SCOPE|GOODCASE|JSON file with nested dictionary, in which a parameter is overwritten (8) +JPP_2500|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (1) +JPP_2501|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (2) +JPP_2502|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (3) +JPP_2503|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (4) +JPP_2504|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (5) +JPP_2506|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (7) +JPP_2507|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (8) +JPP_2508|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (9) diff --git a/test/JPP_TestUsecases.html b/test/JPP_TestUsecases.html index 741b0964..90c0d544 100644 --- a/test/JPP_TestUsecases.html +++ b/test/JPP_TestUsecases.html @@ -382,7 +382,7 @@ -JSON file with nested parameter / string parameter substitution in parameter name
+JSON file with nested parameter / index parameter substitution in parameter value / standard notation
Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string @@ -415,7 +415,7 @@ -JSON file with nested parameter / index parameter substitution in parameter name / standard notation
+JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation
Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string @@ -448,7 +448,7 @@ -JSON file with nested parameter / index parameter substitution in parameter name / dotdict notation
+JSON file with nested parameter / key parameter substitution in parameter value / standard notation
Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string @@ -481,7 +481,7 @@ -JSON file with nested parameter / index parameter substitution in parameter value / standard notation
+JSON file with nested parameter / key parameter substitution in parameter value / dotdict notation
Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string @@ -499,7 +499,7 @@ -JPP_0205 +JPP_0250 @@ -508,14 +508,14 @@
- -GOODCASE + +BADCASE -JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation
-Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string +JSON file with nested parameter / string parameter substitution in parameter value / innermost parameter not existing
+Expected: No values are returned, and JsonPreprocessor throws an exception
@@ -532,7 +532,7 @@ -JPP_0206 +JPP_0251 @@ -541,14 +541,14 @@
- -GOODCASE + +BADCASE -JSON file with nested parameter / key parameter substitution in parameter name / standard notation
-Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string +JSON file with nested parameter / index parameter substitution in parameter value / standard notation / index parameter not existing
+Expected: No values are returned, and JsonPreprocessor throws an exception
@@ -565,7 +565,7 @@ -JPP_0207 +JPP_0252 @@ -574,14 +574,14 @@
- -GOODCASE + +BADCASE -JSON file with nested parameter / key parameter substitution in parameter name / dotdict notation
-Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string +JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation / index parameter not existing
+Expected: No values are returned, and JsonPreprocessor throws an exception
@@ -598,7 +598,7 @@ -JPP_0208 +JPP_0253 @@ -607,14 +607,14 @@
- -GOODCASE + +BADCASE -JSON file with nested parameter / key parameter substitution in parameter value / standard notation
-Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string +JSON file with nested parameter / key parameter substitution in parameter value / standard notation / variant number not existing
+Expected: No values are returned, and JsonPreprocessor throws an exception
@@ -631,7 +631,7 @@ -JPP_0209 +JPP_0254 @@ -640,14 +640,14 @@
- -GOODCASE + +BADCASE -JSON file with nested parameter / key parameter substitution in parameter value / dotdict notation
-Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string +JSON file with nested parameter / key parameter substitution in parameter value / dotdict notation / milestone number not existing
+Expected: No values are returned, and JsonPreprocessor throws an exception
@@ -664,7 +664,7 @@ -JPP_0250 +JPP_0255 @@ -679,7 +679,7 @@ -JSON file with nested parameter / string parameter substitution in parameter value / innermost parameter not existing
+JSON file with substitution of blocked data types inside string values (1)
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -697,7 +697,7 @@ -JPP_0251 +JPP_0256 @@ -712,7 +712,7 @@ -JSON file with nested parameter / string parameter substitution in parameter name / in between parameter not existing
+JSON file with substitution of blocked data types inside string values (2)
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -730,7 +730,7 @@ -JPP_0252 +JPP_0257 @@ -745,7 +745,7 @@ -JSON file with nested parameter / index parameter substitution in parameter name / standard notation / index parameter not existing
+JSON file with substitution of blocked data types inside string values (3)
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -763,7 +763,7 @@ -JPP_0253 +JPP_0258 @@ -778,7 +778,7 @@ -JSON file with nested parameter / index parameter substitution in parameter name / dotdict notation / index parameter not existing
+JSON file with substitution of blocked data types inside string values (4)
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -796,7 +796,7 @@ -JPP_0254 +JPP_0259 @@ -811,7 +811,7 @@ -JSON file with nested parameter / index parameter substitution in parameter value / standard notation / index parameter not existing
+JSON file with substitution of blocked data types inside string values (5)
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -829,7 +829,7 @@ -JPP_0255 +JPP_0260 @@ -844,7 +844,7 @@ -JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation / index parameter not existing
+JSON file with substitution of blocked data types inside string values (6)
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -862,7 +862,7 @@ -JPP_0256 +JPP_0261 @@ -877,7 +877,7 @@ -JSON file with nested parameter / key parameter substitution in parameter name / standard notation / variant number not existing
+JSON file with substitution of blocked data types inside string values (7)
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -895,7 +895,7 @@ -JPP_0257 +JPP_0262 @@ -910,7 +910,7 @@ -JSON file with nested parameter / key parameter substitution in parameter name / dotdict notation / milestone number not existing
+JSON file with substitution of blocked data types inside string values (8)
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -928,7 +928,7 @@ -JPP_0258 +JPP_0263 @@ -943,7 +943,7 @@ -JSON file with nested parameter / key parameter substitution in parameter value / standard notation / variant number not existing
+JSON file with substitution of blocked data types inside string values (9)
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -961,7 +961,7 @@ -JPP_0259 +JPP_0264 @@ -976,7 +976,7 @@ -JSON file with nested parameter / key parameter substitution in parameter value / dotdict notation / milestone number not existing
+JSON file with blocked dynamic key names (1)
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -994,7 +994,7 @@ -JPP_0260 +JPP_0265 @@ -1009,7 +1009,7 @@ -JSON file with list parameter substitution in parameter name (composite data types not allowed in names) / (1)
+JSON file with blocked dynamic key names (2)
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -1027,7 +1027,7 @@ -JPP_0261 +JPP_0266 @@ -1042,7 +1042,7 @@ -JSON file with list parameter substitution in parameter name (composite data types not allowed in names) / (2)
+JSON file with blocked dynamic key names (3)
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -1060,7 +1060,7 @@ -JPP_0262 +JPP_0267 @@ -1075,7 +1075,7 @@ -JSON file with dictionary parameter substitution in parameter name (composite data types not allowed in names) / (1)
+JSON file with blocked dynamic key names (4)
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -1093,7 +1093,7 @@ -JPP_0263 +JPP_0268 @@ -1108,7 +1108,7 @@ -JSON file with dictionary parameter substitution in parameter name (composite data types not allowed in names) / (2)
+JSON file with blocked dynamic key names (5)
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -1126,7 +1126,7 @@ -JPP_0264 +JPP_0269 @@ -1141,7 +1141,7 @@ -JSON file with list parameter substitution in key name (composite data types not allowed in names) / (1)
+JSON file with blocked dynamic key names (6)
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -1159,7 +1159,7 @@ -JPP_0265 +JPP_0270 @@ -1174,7 +1174,7 @@ -JSON file with list parameter substitution in key name (composite data types not allowed in names) / (2)
+JSON file with blocked dynamic key names (7)
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -1192,7 +1192,7 @@ -JPP_0266 +JPP_0271 @@ -1207,7 +1207,7 @@ -JSON file with dictionary parameter substitution in key name (composite data types not allowed in names) / (1)
+JSON file with blocked dynamic key names (8)
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -1225,7 +1225,7 @@ -JPP_0267 +JPP_0272 @@ -1240,7 +1240,7 @@ -JSON file with dictionary parameter substitution in key name (composite data types not allowed in names) / (2)
+JSON file with blocked dynamic key names (9)
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -1258,7 +1258,7 @@ -JPP_0270 +JPP_0273 @@ -1273,11 +1273,10 @@ -JSON file containing a list; list index is defined by a parameter and wrapped in single quotes
+JSON file with blocked dynamic key names (10)
Expected: No values are returned, and JsonPreprocessor throws an exception -
-List indices must be of type 'int' +
@@ -1289,6 +1288,39 @@ 39
+ + + +JPP_0274 + + + + +PARAMETER_SUBSTITUTION + + + + +BADCASE + + + + +JSON file with blocked dynamic key names (11)
+Expected: No values are returned, and JsonPreprocessor throws an exception + + +
+ + + + + + + +40 + + @@ -1320,7 +1352,7 @@ -40 +41 @@ -1354,7 +1386,7 @@ -41 +42 @@ -1388,7 +1420,7 @@ -42 +43 @@ -1422,7 +1454,7 @@ -43 +44 @@ -1456,7 +1488,7 @@ -44 +45 @@ -1490,7 +1522,7 @@ -45 +46 @@ -1524,7 +1556,7 @@ -46 +47 @@ -1558,7 +1590,7 @@ -47 +48 @@ -1592,7 +1624,7 @@ -48 +49 @@ -1626,7 +1658,7 @@ -49 +50 @@ -1660,7 +1692,7 @@ -50 +51 @@ -1694,7 +1726,7 @@ -51 +52 @@ -1728,7 +1760,7 @@ -52 +53 @@ -1762,7 +1794,7 @@ -53 +54 @@ -1796,7 +1828,7 @@ -54 +55 @@ -1830,7 +1862,7 @@ -55 +56 @@ -1864,7 +1896,7 @@ -56 +57 @@ -1898,7 +1930,7 @@ -57 +58 @@ -1932,7 +1964,7 @@ -58 +59 @@ -1966,7 +1998,7 @@ -59 +60 @@ -2000,7 +2032,7 @@ -60 +61 @@ -2034,7 +2066,7 @@ -61 +62 @@ -2068,7 +2100,7 @@ -62 +63 @@ -2102,7 +2134,7 @@ -63 +64 @@ -2136,7 +2168,7 @@ -64 +65 @@ -2170,7 +2202,7 @@ -65 +66 @@ -2204,7 +2236,40 @@ -66 +67 + + + + + +JPP_0400 + + + + +NAMING_CONVENTION + + + + +GOODCASE + + + + +JSON file with several parameter names w.r.t. the naming convention
+Expected: All names are accepted (in definition and in reference) + + +
+ + + + + + + +68 @@ -2238,7 +2303,7 @@ -67 +69 @@ -2272,7 +2337,7 @@ -68 +70 @@ -2306,7 +2371,7 @@ -69 +71 @@ -2339,7 +2404,7 @@ -70 +72 @@ -2372,7 +2437,7 @@ -71 +73 @@ -2405,7 +2470,7 @@ -72 +74 @@ -2438,7 +2503,7 @@ -73 +75 @@ -2471,7 +2536,7 @@ -74 +76 @@ -2504,7 +2569,7 @@ -75 +77 @@ -2537,7 +2602,7 @@ -76 +78 @@ -2570,7 +2635,7 @@ -77 +79 @@ -2603,7 +2668,7 @@ -78 +80 @@ -2636,7 +2701,7 @@ -79 +81 @@ -2669,7 +2734,7 @@ -80 +82 @@ -2702,7 +2767,7 @@ -81 +83 @@ -2735,7 +2800,7 @@ -82 +84 @@ -2768,7 +2833,7 @@ -83 +85 @@ -2802,7 +2867,7 @@ -84 +86 @@ -2836,7 +2901,7 @@ -85 +87 @@ -2869,7 +2934,7 @@ -86 +88 @@ -2902,7 +2967,7 @@ -87 +89 @@ -2935,7 +3000,7 @@ -88 +90 @@ -2968,7 +3033,7 @@ -89 +91 @@ -3001,7 +3066,7 @@ -90 +92 @@ -3034,7 +3099,7 @@ -91 +93 @@ -3067,7 +3132,7 @@ -92 +94 @@ -3100,7 +3165,7 @@ -93 +95 @@ -3133,7 +3198,7 @@ -94 +96 @@ -3166,7 +3231,7 @@ -95 +97 @@ -3199,7 +3264,7 @@ -96 +98 @@ -3232,7 +3297,7 @@ -97 +99 @@ -3265,7 +3330,7 @@ -98 +100 @@ -3298,7 +3363,7 @@ -99 +101 @@ -3331,7 +3396,7 @@ -100 +102 @@ -3364,7 +3429,7 @@ -101 +103 @@ -3397,7 +3462,7 @@ -102 +104 @@ -3430,7 +3495,7 @@ -103 +105 @@ -3463,7 +3528,7 @@ -104 +106 @@ -3496,7 +3561,7 @@ -105 +107 @@ -3529,7 +3594,7 @@ -106 +108 @@ -3562,7 +3627,7 @@ -107 +109 @@ -3595,7 +3660,7 @@ -108 +110 @@ -3628,7 +3693,7 @@ -109 +111 @@ -3661,7 +3726,7 @@ -110 +112 @@ -3694,7 +3759,7 @@ -111 +113 @@ -3728,7 +3793,7 @@ -112 +114 @@ -3761,7 +3826,7 @@ -113 +115 @@ -3794,7 +3859,7 @@ -114 +116 @@ -3827,7 +3892,7 @@ -115 +117 @@ -3860,7 +3925,7 @@ -116 +118 @@ -3893,7 +3958,7 @@ -117 +119 @@ -3926,7 +3991,7 @@ -118 +120 @@ -3959,7 +4024,7 @@ -119 +121 @@ -3992,7 +4057,7 @@ -120 +122 @@ -4025,7 +4090,7 @@ -121 +123 @@ -4058,7 +4123,7 @@ -122 +124 @@ -4091,7 +4156,7 @@ -123 +125 @@ -4124,7 +4189,7 @@ -124 +126 @@ -4157,7 +4222,7 @@ -125 +127 @@ -4190,7 +4255,7 @@ -126 +128 @@ -4223,7 +4288,7 @@ -127 +129 @@ -4256,7 +4321,7 @@ -128 +130 @@ -4289,7 +4354,7 @@ -129 +131 @@ -4322,7 +4387,7 @@ -130 +132 @@ -4355,7 +4420,7 @@ -131 +133 @@ -4388,7 +4453,7 @@ -132 +134 @@ -4421,7 +4486,7 @@ -133 +135 @@ -4454,7 +4519,7 @@ -134 +136 @@ -4487,7 +4552,7 @@ -135 +137 @@ -4520,7 +4585,7 @@ -136 +138 @@ -4553,7 +4618,7 @@ -137 +139 @@ -4586,7 +4651,7 @@ -138 +140 @@ -4619,7 +4684,7 @@ -139 +141 @@ -4652,7 +4717,7 @@ -140 +142 @@ -4685,7 +4750,7 @@ -141 +143 @@ -4718,7 +4783,7 @@ -142 +144 @@ -4751,7 +4816,7 @@ -143 +145 @@ -4784,7 +4849,7 @@ -144 +146 @@ -4817,7 +4882,7 @@ -145 +147 @@ -4850,7 +4915,7 @@ -146 +148 @@ -4883,7 +4948,7 @@ -147 +149 @@ -4916,7 +4981,7 @@ -148 +150 @@ -4949,7 +5014,7 @@ -149 +151 @@ -4977,12 +5042,441 @@
+ + + + + +152 + + + + + +JPP_2000 + + + + +PARAMETER_SCOPE + + + + +GOODCASE + + + + +JSON file with nested dictionary, in which a parameter is overwritten (1)
+Expected: JsonPreprocessor returns expected value + + +
+ + + + + + + +153 + + + + + +JPP_2001 + + + + +PARAMETER_SCOPE + + + + +GOODCASE + + + + +JSON file with nested dictionary, in which a parameter is overwritten (2)
+Expected: JsonPreprocessor returns expected value + + +
+ + + + + + + +154 + + + + + +JPP_2002 + + + + +PARAMETER_SCOPE + + + + +GOODCASE + + + + +JSON file with nested dictionary, in which a parameter is overwritten (3)
+Expected: JsonPreprocessor returns expected value + + +
+ + + + + + + +155 + + + + + +JPP_2003 + + + + +PARAMETER_SCOPE + + + + +GOODCASE + + + + +JSON file with nested dictionary, in which a parameter is overwritten (4)
+Expected: JsonPreprocessor returns expected value + + +
+ + + + + + + +156 + + + + + +JPP_2007 + + + + +PARAMETER_SCOPE + + + + +GOODCASE + + + + +JSON file with nested dictionary, in which a parameter is overwritten (8)
+Expected: JsonPreprocessor returns expected value + + +
+ + + + + + + +157 + + + + + +JPP_2500 + + + + +PARAMETER_SCOPE + + + + +BADCASE + + + + +JSON file containing a parameter with missing scope (1)
+Expected: JsonPreprocessor returns expected value + + +
+ + + + + + + +158 + + + + + +JPP_2501 + + + + +PARAMETER_SCOPE + + + + +BADCASE + + + + +JSON file containing a parameter with missing scope (2)
+Expected: JsonPreprocessor returns expected value + + +
+ + + + + + + +159 + + + + + +JPP_2502 + + + + +PARAMETER_SCOPE + + + + +BADCASE + + + + +JSON file containing a parameter with missing scope (3)
+Expected: JsonPreprocessor returns expected value + + +
+ + + + + + + +160 + + + + + +JPP_2503 + + + + +PARAMETER_SCOPE + + + + +BADCASE + + + + +JSON file containing a parameter with missing scope (4)
+Expected: JsonPreprocessor returns expected value + + +
+ + + + + + + +161 + + + + + +JPP_2504 + + + + +PARAMETER_SCOPE + + + + +BADCASE + + + + +JSON file containing a parameter with missing scope (5)
+Expected: JsonPreprocessor returns expected value + + +
+ + + + + + + +162 + + + + + +JPP_2506 + + + + +PARAMETER_SCOPE + + + + +BADCASE + + + + +JSON file containing a parameter with missing scope (7)
+Expected: JsonPreprocessor returns expected value + + +
+ + + + + + + +163 + + + + + +JPP_2507 + + + + +PARAMETER_SCOPE + + + + +BADCASE + + + + +JSON file containing a parameter with missing scope (8)
+Expected: JsonPreprocessor returns expected value + + +
+ + + + + + + +164 + + + + + +JPP_2508 + + + + +PARAMETER_SCOPE + + + + +BADCASE + + + + +JSON file containing a parameter with missing scope (9)
+Expected: JsonPreprocessor returns expected value + + +
+ +
 

-
Generated: 17.04.2024 - 20:03:38
+
Generated: 25.10.2024 - 20:21:51
 
diff --git a/test/JPP_TestUsecases.rst b/test/JPP_TestUsecases.rst index e1848a4a..9d46a977 100644 --- a/test/JPP_TestUsecases.rst +++ b/test/JPP_TestUsecases.rst @@ -119,7 +119,7 @@ Test Use Cases [PARAMETER_SUBSTITUTION / GOODCASE] - **JSON file with nested parameter / string parameter substitution in parameter name** + **JSON file with nested parameter / index parameter substitution in parameter value / standard notation** Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string @@ -129,7 +129,7 @@ Test Use Cases [PARAMETER_SUBSTITUTION / GOODCASE] - **JSON file with nested parameter / index parameter substitution in parameter name / standard notation** + **JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation** Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string @@ -139,7 +139,7 @@ Test Use Cases [PARAMETER_SUBSTITUTION / GOODCASE] - **JSON file with nested parameter / index parameter substitution in parameter name / dotdict notation** + **JSON file with nested parameter / key parameter substitution in parameter value / standard notation** Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string @@ -149,251 +149,259 @@ Test Use Cases [PARAMETER_SUBSTITUTION / GOODCASE] - **JSON file with nested parameter / index parameter substitution in parameter value / standard notation** + **JSON file with nested parameter / key parameter substitution in parameter value / dotdict notation** Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string ---- -* **Test JPP_0205** +* **Test JPP_0250** - [PARAMETER_SUBSTITUTION / GOODCASE] + [PARAMETER_SUBSTITUTION / BADCASE] - **JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation** + **JSON file with nested parameter / string parameter substitution in parameter value / innermost parameter not existing** - Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string + Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_0206** +* **Test JPP_0251** - [PARAMETER_SUBSTITUTION / GOODCASE] + [PARAMETER_SUBSTITUTION / BADCASE] - **JSON file with nested parameter / key parameter substitution in parameter name / standard notation** + **JSON file with nested parameter / index parameter substitution in parameter value / standard notation / index parameter not existing** - Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string + Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_0207** +* **Test JPP_0252** - [PARAMETER_SUBSTITUTION / GOODCASE] + [PARAMETER_SUBSTITUTION / BADCASE] - **JSON file with nested parameter / key parameter substitution in parameter name / dotdict notation** + **JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation / index parameter not existing** - Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string + Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_0208** +* **Test JPP_0253** - [PARAMETER_SUBSTITUTION / GOODCASE] + [PARAMETER_SUBSTITUTION / BADCASE] - **JSON file with nested parameter / key parameter substitution in parameter value / standard notation** + **JSON file with nested parameter / key parameter substitution in parameter value / standard notation / variant number not existing** - Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string + Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_0209** +* **Test JPP_0254** - [PARAMETER_SUBSTITUTION / GOODCASE] + [PARAMETER_SUBSTITUTION / BADCASE] - **JSON file with nested parameter / key parameter substitution in parameter value / dotdict notation** + **JSON file with nested parameter / key parameter substitution in parameter value / dotdict notation / milestone number not existing** - Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string + Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_0250** +* **Test JPP_0255** [PARAMETER_SUBSTITUTION / BADCASE] - **JSON file with nested parameter / string parameter substitution in parameter value / innermost parameter not existing** + **JSON file with substitution of blocked data types inside string values (1)** Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_0251** +* **Test JPP_0256** [PARAMETER_SUBSTITUTION / BADCASE] - **JSON file with nested parameter / string parameter substitution in parameter name / in between parameter not existing** + **JSON file with substitution of blocked data types inside string values (2)** Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_0252** +* **Test JPP_0257** [PARAMETER_SUBSTITUTION / BADCASE] - **JSON file with nested parameter / index parameter substitution in parameter name / standard notation / index parameter not existing** + **JSON file with substitution of blocked data types inside string values (3)** Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_0253** +* **Test JPP_0258** [PARAMETER_SUBSTITUTION / BADCASE] - **JSON file with nested parameter / index parameter substitution in parameter name / dotdict notation / index parameter not existing** + **JSON file with substitution of blocked data types inside string values (4)** Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_0254** +* **Test JPP_0259** [PARAMETER_SUBSTITUTION / BADCASE] - **JSON file with nested parameter / index parameter substitution in parameter value / standard notation / index parameter not existing** + **JSON file with substitution of blocked data types inside string values (5)** Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_0255** +* **Test JPP_0260** [PARAMETER_SUBSTITUTION / BADCASE] - **JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation / index parameter not existing** + **JSON file with substitution of blocked data types inside string values (6)** Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_0256** +* **Test JPP_0261** [PARAMETER_SUBSTITUTION / BADCASE] - **JSON file with nested parameter / key parameter substitution in parameter name / standard notation / variant number not existing** + **JSON file with substitution of blocked data types inside string values (7)** Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_0257** +* **Test JPP_0262** [PARAMETER_SUBSTITUTION / BADCASE] - **JSON file with nested parameter / key parameter substitution in parameter name / dotdict notation / milestone number not existing** + **JSON file with substitution of blocked data types inside string values (8)** Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_0258** +* **Test JPP_0263** [PARAMETER_SUBSTITUTION / BADCASE] - **JSON file with nested parameter / key parameter substitution in parameter value / standard notation / variant number not existing** + **JSON file with substitution of blocked data types inside string values (9)** Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_0259** +* **Test JPP_0264** [PARAMETER_SUBSTITUTION / BADCASE] - **JSON file with nested parameter / key parameter substitution in parameter value / dotdict notation / milestone number not existing** + **JSON file with blocked dynamic key names (1)** Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_0260** +* **Test JPP_0265** [PARAMETER_SUBSTITUTION / BADCASE] - **JSON file with list parameter substitution in parameter name (composite data types not allowed in names) / (1)** + **JSON file with blocked dynamic key names (2)** Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_0261** +* **Test JPP_0266** [PARAMETER_SUBSTITUTION / BADCASE] - **JSON file with list parameter substitution in parameter name (composite data types not allowed in names) / (2)** + **JSON file with blocked dynamic key names (3)** Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_0262** +* **Test JPP_0267** [PARAMETER_SUBSTITUTION / BADCASE] - **JSON file with dictionary parameter substitution in parameter name (composite data types not allowed in names) / (1)** + **JSON file with blocked dynamic key names (4)** Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_0263** +* **Test JPP_0268** [PARAMETER_SUBSTITUTION / BADCASE] - **JSON file with dictionary parameter substitution in parameter name (composite data types not allowed in names) / (2)** + **JSON file with blocked dynamic key names (5)** Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_0264** +* **Test JPP_0269** [PARAMETER_SUBSTITUTION / BADCASE] - **JSON file with list parameter substitution in key name (composite data types not allowed in names) / (1)** + **JSON file with blocked dynamic key names (6)** Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_0265** +* **Test JPP_0270** [PARAMETER_SUBSTITUTION / BADCASE] - **JSON file with list parameter substitution in key name (composite data types not allowed in names) / (2)** + **JSON file with blocked dynamic key names (7)** Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_0266** +* **Test JPP_0271** [PARAMETER_SUBSTITUTION / BADCASE] - **JSON file with dictionary parameter substitution in key name (composite data types not allowed in names) / (1)** + **JSON file with blocked dynamic key names (8)** Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_0267** +* **Test JPP_0272** [PARAMETER_SUBSTITUTION / BADCASE] - **JSON file with dictionary parameter substitution in key name (composite data types not allowed in names) / (2)** + **JSON file with blocked dynamic key names (9)** Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_0270** +* **Test JPP_0273** [PARAMETER_SUBSTITUTION / BADCASE] - **JSON file containing a list; list index is defined by a parameter and wrapped in single quotes** + **JSON file with blocked dynamic key names (10)** Expected: No values are returned, and JsonPreprocessor throws an exception - *Hint: List indices must be of type 'int'* +---- + +* **Test JPP_0274** + + [PARAMETER_SUBSTITUTION / BADCASE] + + **JSON file with blocked dynamic key names (11)** + + Expected: No values are returned, and JsonPreprocessor throws an exception ---- @@ -721,6 +729,16 @@ Test Use Cases ---- +* **Test JPP_0400** + + [NAMING_CONVENTION / GOODCASE] + + **JSON file with several parameter names w.r.t. the naming convention** + + Expected: All names are accepted (in definition and in reference) + +---- + * **Test JPP_0500** [COMPOSITE_EXPRESSIONS / GOODCASE] @@ -1573,5 +1591,135 @@ Test Use Cases ---- -Generated: 17.04.2024 - 20:03:38 +* **Test JPP_2000** + + [PARAMETER_SCOPE / GOODCASE] + + **JSON file with nested dictionary, in which a parameter is overwritten (1)** + + Expected: JsonPreprocessor returns expected value + +---- + +* **Test JPP_2001** + + [PARAMETER_SCOPE / GOODCASE] + + **JSON file with nested dictionary, in which a parameter is overwritten (2)** + + Expected: JsonPreprocessor returns expected value + +---- + +* **Test JPP_2002** + + [PARAMETER_SCOPE / GOODCASE] + + **JSON file with nested dictionary, in which a parameter is overwritten (3)** + + Expected: JsonPreprocessor returns expected value + +---- + +* **Test JPP_2003** + + [PARAMETER_SCOPE / GOODCASE] + + **JSON file with nested dictionary, in which a parameter is overwritten (4)** + + Expected: JsonPreprocessor returns expected value + +---- + +* **Test JPP_2007** + + [PARAMETER_SCOPE / GOODCASE] + + **JSON file with nested dictionary, in which a parameter is overwritten (8)** + + Expected: JsonPreprocessor returns expected value + +---- + +* **Test JPP_2500** + + [PARAMETER_SCOPE / BADCASE] + + **JSON file containing a parameter with missing scope (1)** + + Expected: JsonPreprocessor returns expected value + +---- + +* **Test JPP_2501** + + [PARAMETER_SCOPE / BADCASE] + + **JSON file containing a parameter with missing scope (2)** + + Expected: JsonPreprocessor returns expected value + +---- + +* **Test JPP_2502** + + [PARAMETER_SCOPE / BADCASE] + + **JSON file containing a parameter with missing scope (3)** + + Expected: JsonPreprocessor returns expected value + +---- + +* **Test JPP_2503** + + [PARAMETER_SCOPE / BADCASE] + + **JSON file containing a parameter with missing scope (4)** + + Expected: JsonPreprocessor returns expected value + +---- + +* **Test JPP_2504** + + [PARAMETER_SCOPE / BADCASE] + + **JSON file containing a parameter with missing scope (5)** + + Expected: JsonPreprocessor returns expected value + +---- + +* **Test JPP_2506** + + [PARAMETER_SCOPE / BADCASE] + + **JSON file containing a parameter with missing scope (7)** + + Expected: JsonPreprocessor returns expected value + +---- + +* **Test JPP_2507** + + [PARAMETER_SCOPE / BADCASE] + + **JSON file containing a parameter with missing scope (8)** + + Expected: JsonPreprocessor returns expected value + +---- + +* **Test JPP_2508** + + [PARAMETER_SCOPE / BADCASE] + + **JSON file containing a parameter with missing scope (9)** + + Expected: JsonPreprocessor returns expected value + +---- + +Generated: 25.10.2024 - 20:21:51 diff --git a/test/JPP_TestUsecases.txt b/test/JPP_TestUsecases.txt index 21c6fd2d..2b0cf434 100644 --- a/test/JPP_TestUsecases.txt +++ b/test/JPP_TestUsecases.txt @@ -56,38 +56,18 @@ Description: JSON file with nested parameter / string parameter substitution in Expectation: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string ------------------------------------------------------------------------------------------------------------------------ Test JPP_0201 / PARAMETER_SUBSTITUTION / GOODCASE -Description: JSON file with nested parameter / string parameter substitution in parameter name -Expectation: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string ------------------------------------------------------------------------------------------------------------------------- -Test JPP_0202 / PARAMETER_SUBSTITUTION / GOODCASE -Description: JSON file with nested parameter / index parameter substitution in parameter name / standard notation -Expectation: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string ------------------------------------------------------------------------------------------------------------------------- -Test JPP_0203 / PARAMETER_SUBSTITUTION / GOODCASE -Description: JSON file with nested parameter / index parameter substitution in parameter name / dotdict notation -Expectation: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string ------------------------------------------------------------------------------------------------------------------------- -Test JPP_0204 / PARAMETER_SUBSTITUTION / GOODCASE Description: JSON file with nested parameter / index parameter substitution in parameter value / standard notation Expectation: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string ------------------------------------------------------------------------------------------------------------------------ -Test JPP_0205 / PARAMETER_SUBSTITUTION / GOODCASE +Test JPP_0202 / PARAMETER_SUBSTITUTION / GOODCASE Description: JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation Expectation: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string ------------------------------------------------------------------------------------------------------------------------ -Test JPP_0206 / PARAMETER_SUBSTITUTION / GOODCASE -Description: JSON file with nested parameter / key parameter substitution in parameter name / standard notation -Expectation: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string ------------------------------------------------------------------------------------------------------------------------- -Test JPP_0207 / PARAMETER_SUBSTITUTION / GOODCASE -Description: JSON file with nested parameter / key parameter substitution in parameter name / dotdict notation -Expectation: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string ------------------------------------------------------------------------------------------------------------------------- -Test JPP_0208 / PARAMETER_SUBSTITUTION / GOODCASE +Test JPP_0203 / PARAMETER_SUBSTITUTION / GOODCASE Description: JSON file with nested parameter / key parameter substitution in parameter value / standard notation Expectation: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string ------------------------------------------------------------------------------------------------------------------------ -Test JPP_0209 / PARAMETER_SUBSTITUTION / GOODCASE +Test JPP_0204 / PARAMETER_SUBSTITUTION / GOODCASE Description: JSON file with nested parameter / key parameter substitution in parameter value / dotdict notation Expectation: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string ------------------------------------------------------------------------------------------------------------------------ @@ -96,77 +76,100 @@ Description: JSON file with nested parameter / string parameter substitution in Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ Test JPP_0251 / PARAMETER_SUBSTITUTION / BADCASE -Description: JSON file with nested parameter / string parameter substitution in parameter name / in between parameter not existing +Description: JSON file with nested parameter / index parameter substitution in parameter value / standard notation / index parameter not existing Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ Test JPP_0252 / PARAMETER_SUBSTITUTION / BADCASE -Description: JSON file with nested parameter / index parameter substitution in parameter name / standard notation / index parameter not existing +Description: JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation / index parameter not existing Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ Test JPP_0253 / PARAMETER_SUBSTITUTION / BADCASE -Description: JSON file with nested parameter / index parameter substitution in parameter name / dotdict notation / index parameter not existing +Description: JSON file with nested parameter / key parameter substitution in parameter value / standard notation / variant number not existing Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ Test JPP_0254 / PARAMETER_SUBSTITUTION / BADCASE -Description: JSON file with nested parameter / index parameter substitution in parameter value / standard notation / index parameter not existing +Description: JSON file with nested parameter / key parameter substitution in parameter value / dotdict notation / milestone number not existing Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ Test JPP_0255 / PARAMETER_SUBSTITUTION / BADCASE -Description: JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation / index parameter not existing +Description: JSON file with substitution of blocked data types inside string values (1) Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ Test JPP_0256 / PARAMETER_SUBSTITUTION / BADCASE -Description: JSON file with nested parameter / key parameter substitution in parameter name / standard notation / variant number not existing +Description: JSON file with substitution of blocked data types inside string values (2) Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ Test JPP_0257 / PARAMETER_SUBSTITUTION / BADCASE -Description: JSON file with nested parameter / key parameter substitution in parameter name / dotdict notation / milestone number not existing +Description: JSON file with substitution of blocked data types inside string values (3) Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ Test JPP_0258 / PARAMETER_SUBSTITUTION / BADCASE -Description: JSON file with nested parameter / key parameter substitution in parameter value / standard notation / variant number not existing +Description: JSON file with substitution of blocked data types inside string values (4) Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ Test JPP_0259 / PARAMETER_SUBSTITUTION / BADCASE -Description: JSON file with nested parameter / key parameter substitution in parameter value / dotdict notation / milestone number not existing +Description: JSON file with substitution of blocked data types inside string values (5) Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ Test JPP_0260 / PARAMETER_SUBSTITUTION / BADCASE -Description: JSON file with list parameter substitution in parameter name (composite data types not allowed in names) / (1) +Description: JSON file with substitution of blocked data types inside string values (6) Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ Test JPP_0261 / PARAMETER_SUBSTITUTION / BADCASE -Description: JSON file with list parameter substitution in parameter name (composite data types not allowed in names) / (2) +Description: JSON file with substitution of blocked data types inside string values (7) Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ Test JPP_0262 / PARAMETER_SUBSTITUTION / BADCASE -Description: JSON file with dictionary parameter substitution in parameter name (composite data types not allowed in names) / (1) +Description: JSON file with substitution of blocked data types inside string values (8) Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ Test JPP_0263 / PARAMETER_SUBSTITUTION / BADCASE -Description: JSON file with dictionary parameter substitution in parameter name (composite data types not allowed in names) / (2) +Description: JSON file with substitution of blocked data types inside string values (9) Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ Test JPP_0264 / PARAMETER_SUBSTITUTION / BADCASE -Description: JSON file with list parameter substitution in key name (composite data types not allowed in names) / (1) +Description: JSON file with blocked dynamic key names (1) Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ Test JPP_0265 / PARAMETER_SUBSTITUTION / BADCASE -Description: JSON file with list parameter substitution in key name (composite data types not allowed in names) / (2) +Description: JSON file with blocked dynamic key names (2) Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ Test JPP_0266 / PARAMETER_SUBSTITUTION / BADCASE -Description: JSON file with dictionary parameter substitution in key name (composite data types not allowed in names) / (1) +Description: JSON file with blocked dynamic key names (3) Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ Test JPP_0267 / PARAMETER_SUBSTITUTION / BADCASE -Description: JSON file with dictionary parameter substitution in key name (composite data types not allowed in names) / (2) +Description: JSON file with blocked dynamic key names (4) +Expectation: No values are returned, and JsonPreprocessor throws an exception +------------------------------------------------------------------------------------------------------------------------ +Test JPP_0268 / PARAMETER_SUBSTITUTION / BADCASE +Description: JSON file with blocked dynamic key names (5) +Expectation: No values are returned, and JsonPreprocessor throws an exception +------------------------------------------------------------------------------------------------------------------------ +Test JPP_0269 / PARAMETER_SUBSTITUTION / BADCASE +Description: JSON file with blocked dynamic key names (6) Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ Test JPP_0270 / PARAMETER_SUBSTITUTION / BADCASE -Description: JSON file containing a list; list index is defined by a parameter and wrapped in single quotes +Description: JSON file with blocked dynamic key names (7) +Expectation: No values are returned, and JsonPreprocessor throws an exception +------------------------------------------------------------------------------------------------------------------------ +Test JPP_0271 / PARAMETER_SUBSTITUTION / BADCASE +Description: JSON file with blocked dynamic key names (8) +Expectation: No values are returned, and JsonPreprocessor throws an exception +------------------------------------------------------------------------------------------------------------------------ +Test JPP_0272 / PARAMETER_SUBSTITUTION / BADCASE +Description: JSON file with blocked dynamic key names (9) +Expectation: No values are returned, and JsonPreprocessor throws an exception +------------------------------------------------------------------------------------------------------------------------ +Test JPP_0273 / PARAMETER_SUBSTITUTION / BADCASE +Description: JSON file with blocked dynamic key names (10) +Expectation: No values are returned, and JsonPreprocessor throws an exception +------------------------------------------------------------------------------------------------------------------------ +Test JPP_0274 / PARAMETER_SUBSTITUTION / BADCASE +Description: JSON file with blocked dynamic key names (11) Expectation: No values are returned, and JsonPreprocessor throws an exception -Hint.......: List indices must be of type 'int' ------------------------------------------------------------------------------------------------------------------------ Test JPP_0300 / VALUE_DETECTION / GOODCASE Description: JSON file with parameter of type 'list' / index (in square brackets) defined outside the curly brackets (valid syntax) @@ -303,6 +306,10 @@ Description: JSON file with expression starting with '${' and ending with '}', f Expectation: No values are returned, and JsonPreprocessor throws an exception Hint.......: Checklist rule 6 / pattern 5 ------------------------------------------------------------------------------------------------------------------------ +Test JPP_0400 / NAMING_CONVENTION / GOODCASE +Description: JSON file with several parameter names w.r.t. the naming convention +Expectation: All names are accepted (in definition and in reference) +------------------------------------------------------------------------------------------------------------------------ Test JPP_0500 / COMPOSITE_EXPRESSIONS / GOODCASE Description: JSON file with composite data structure (nested lists and dictionaries 1) Expectation: JsonPreprocessor returns expected value @@ -645,5 +652,57 @@ Test JPP_1901 / ASSIGNMENTS_BY_REFERENCE / GOODCASE Description: JSON file with list assignments (by reference) Expectation: JsonPreprocessor returns expected value ------------------------------------------------------------------------------------------------------------------------ -Generated: 17.04.2024 - 20:03:38 +Test JPP_2000 / PARAMETER_SCOPE / GOODCASE +Description: JSON file with nested dictionary, in which a parameter is overwritten (1) +Expectation: JsonPreprocessor returns expected value +------------------------------------------------------------------------------------------------------------------------ +Test JPP_2001 / PARAMETER_SCOPE / GOODCASE +Description: JSON file with nested dictionary, in which a parameter is overwritten (2) +Expectation: JsonPreprocessor returns expected value +------------------------------------------------------------------------------------------------------------------------ +Test JPP_2002 / PARAMETER_SCOPE / GOODCASE +Description: JSON file with nested dictionary, in which a parameter is overwritten (3) +Expectation: JsonPreprocessor returns expected value +------------------------------------------------------------------------------------------------------------------------ +Test JPP_2003 / PARAMETER_SCOPE / GOODCASE +Description: JSON file with nested dictionary, in which a parameter is overwritten (4) +Expectation: JsonPreprocessor returns expected value +------------------------------------------------------------------------------------------------------------------------ +Test JPP_2007 / PARAMETER_SCOPE / GOODCASE +Description: JSON file with nested dictionary, in which a parameter is overwritten (8) +Expectation: JsonPreprocessor returns expected value +------------------------------------------------------------------------------------------------------------------------ +Test JPP_2500 / PARAMETER_SCOPE / BADCASE +Description: JSON file containing a parameter with missing scope (1) +Expectation: JsonPreprocessor returns expected value +------------------------------------------------------------------------------------------------------------------------ +Test JPP_2501 / PARAMETER_SCOPE / BADCASE +Description: JSON file containing a parameter with missing scope (2) +Expectation: JsonPreprocessor returns expected value +------------------------------------------------------------------------------------------------------------------------ +Test JPP_2502 / PARAMETER_SCOPE / BADCASE +Description: JSON file containing a parameter with missing scope (3) +Expectation: JsonPreprocessor returns expected value +------------------------------------------------------------------------------------------------------------------------ +Test JPP_2503 / PARAMETER_SCOPE / BADCASE +Description: JSON file containing a parameter with missing scope (4) +Expectation: JsonPreprocessor returns expected value +------------------------------------------------------------------------------------------------------------------------ +Test JPP_2504 / PARAMETER_SCOPE / BADCASE +Description: JSON file containing a parameter with missing scope (5) +Expectation: JsonPreprocessor returns expected value +------------------------------------------------------------------------------------------------------------------------ +Test JPP_2506 / PARAMETER_SCOPE / BADCASE +Description: JSON file containing a parameter with missing scope (7) +Expectation: JsonPreprocessor returns expected value +------------------------------------------------------------------------------------------------------------------------ +Test JPP_2507 / PARAMETER_SCOPE / BADCASE +Description: JSON file containing a parameter with missing scope (8) +Expectation: JsonPreprocessor returns expected value +------------------------------------------------------------------------------------------------------------------------ +Test JPP_2508 / PARAMETER_SCOPE / BADCASE +Description: JSON file containing a parameter with missing scope (9) +Expectation: JsonPreprocessor returns expected value +------------------------------------------------------------------------------------------------------------------------ +Generated: 25.10.2024 - 20:21:51 diff --git a/test/component_test.py b/test/component_test.py index 29ae1687..c110ed1f 100644 --- a/test/component_test.py +++ b/test/component_test.py @@ -22,8 +22,8 @@ # # -------------------------------------------------------------------------------------------------------------- # -VERSION = "0.45.0" -VERSION_DATE = "17.04.2024" +VERSION = "0.48.1" +VERSION_DATE = "25.10.2024" # # -------------------------------------------------------------------------------------------------------------- #TM*** diff --git a/test/component_test_single.bat b/test/component_test_single.bat deleted file mode 100644 index 4e0db40c..00000000 --- a/test/component_test_single.bat +++ /dev/null @@ -1,40 +0,0 @@ -@echo off - -REM "%RobotPythonPath%/python.exe" "D:/ROBFW/components/python-jsonpreprocessor/test/component_test.py" --testid="JPP_0353;JPP_0354;JPP_0355;JPP_0356;JPP_0357;JPP_0358;JPP_0359;JPP_0360" -REM "%RobotPythonPath%/python.exe" "D:/ROBFW/components/python-jsonpreprocessor/test/component_test.py" --testid="JPP_0361;JPP_0362;JPP_0363;JPP_0364;JPP_0365;JPP_0366" -REM "%RobotPythonPath%/python.exe" "D:/ROBFW/components/python-jsonpreprocessor/test/component_test.py" --testid="JPP_0367;JPP_0368;JPP_0369;JPP_0370;JPP_0371" -REM "%RobotPythonPath%/python.exe" "D:/ROBFW/components/python-jsonpreprocessor/test/component_test.py" --testid="JPP_0450;JPP_0451;JPP_0452;JPP_0453;JPP_0454;JPP_0455;JPP_0456;JPP_0457;JPP_0458" - -REM "%RobotPythonPath%/python.exe" "D:/ROBFW/components/python-jsonpreprocessor/test/component_test.py" --testid="JPP_0550;JPP_0900" --recreateinstance - - -REM "%RobotPythonPath%/python.exe" "D:/ROBFW/components/python-jsonpreprocessor/test/component_test.py" --testid="JPP_0004" -REM "%RobotPythonPath%/python.exe" "D:/ROBFW/components/python-jsonpreprocessor/test/component_test.py" --testid="JPP_0268" -REM "%RobotPythonPath%/python.exe" "D:/ROBFW/components/python-jsonpreprocessor/test/component_test.py" --testid="JPP_0450" -REM "%RobotPythonPath%/python.exe" "D:/ROBFW/components/python-jsonpreprocessor/test/component_test.py" --testid="JPP_0504" - -"%RobotPythonPath%/python.exe" "D:/ROBFW/components/python-jsonpreprocessor/test/component_test.py" --testid="JPP_0515" - - - -REM "%RobotPythonPath%/python.exe" "D:/ROBFW/components/python-jsonpreprocessor/test/component_test.py" --testid="JPP_0507" -REM "%RobotPythonPath%/python.exe" "D:/ROBFW/components/python-jsonpreprocessor/test/component_test.py" --testid="JPP_0508" -REM "%RobotPythonPath%/python.exe" "D:/ROBFW/components/python-jsonpreprocessor/test/component_test.py" --testid="JPP_0509" -REM "%RobotPythonPath%/python.exe" "D:/ROBFW/components/python-jsonpreprocessor/test/component_test.py" --testid="JPP_1150" -REM "%RobotPythonPath%/python.exe" "D:/ROBFW/components/python-jsonpreprocessor/test/component_test.py" --testid="JPP_0201;JPP_0900" -REM "%RobotPythonPath%/python.exe" "D:/ROBFW/components/python-jsonpreprocessor/test/component_test.py" --testid="JPP_0201;JPP_0900" --recreateinstance - -REM "%RobotPythonPath%/python.exe" "D:/ROBFW/components/python-jsonpreprocessor/test/component_test.py" --testid="JPP_0457;JPP_0458;JPP_0500;JPP_0501" -REM "%RobotPythonPath%/python.exe" "D:/ROBFW/components/python-jsonpreprocessor/test/component_test.py" --testid="JPP_0450;JPP_0457;JPP_0458;JPP_0500;JPP_0501" - - - - -REM "%RobotPythonPath%/python.exe" "D:/ROBFW/components/python-jsonpreprocessor/test/component_test.py" -REM "%RobotPythonPath%/python.exe" "D:/ROBFW/components/python-jsonpreprocessor/test/component_test.py" --codedump -REM "%RobotPythonPath%/python.exe" "D:/ROBFW/components/python-jsonpreprocessor/test/component_test.py" --configdump - -echo --------------------------------------- -echo component_test returned ERRORLEVEL : %ERRORLEVEL% -echo --------------------------------------- - diff --git a/test/libs/CCodePatterns.py b/test/libs/CCodePatterns.py index 1bdef07a..e527d9ea 100644 --- a/test/libs/CCodePatterns.py +++ b/test/libs/CCodePatterns.py @@ -81,7 +81,7 @@ def GetPyTestFileHeader(self, PYTESTFILENAME="", CLASSNAME=""): # # ####PYTESTFILENAME#### # -# XC-CT/ECA3-Queckenstedt +# XC-HWP/ESW3-Queckenstedt # # ####DATEOFCREATION#### # diff --git a/test/pytest/pytestfiles/test_01_DATA_TYPES_GOODCASE.py b/test/pytest/pytestfiles/test_01_DATA_TYPES_GOODCASE.py index e83f6412..b6efa5e3 100644 --- a/test/pytest/pytestfiles/test_01_DATA_TYPES_GOODCASE.py +++ b/test/pytest/pytestfiles/test_01_DATA_TYPES_GOODCASE.py @@ -16,9 +16,9 @@ # # test_01_DATA_TYPES_GOODCASE.py # -# XC-CT/ECA3-Queckenstedt +# XC-HWP/ESW3-Queckenstedt # -# 14.03.2024 - 15:46:24 +# 25.10.2024 - 20:31:28 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_02_DATA_INTEGRITY_GOODCASE.py b/test/pytest/pytestfiles/test_02_DATA_INTEGRITY_GOODCASE.py index be06d44e..8efb6792 100644 --- a/test/pytest/pytestfiles/test_02_DATA_INTEGRITY_GOODCASE.py +++ b/test/pytest/pytestfiles/test_02_DATA_INTEGRITY_GOODCASE.py @@ -16,9 +16,9 @@ # # test_02_DATA_INTEGRITY_GOODCASE.py # -# XC-CT/ECA3-Queckenstedt +# XC-HWP/ESW3-Queckenstedt # -# 15.03.2024 - 18:49:01 +# 25.10.2024 - 20:31:28 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_03_PARAMETER_SUBSTITUTION_GOODCASE.py b/test/pytest/pytestfiles/test_03_PARAMETER_SUBSTITUTION_GOODCASE.py index 0a3a7454..c71a7dcd 100644 --- a/test/pytest/pytestfiles/test_03_PARAMETER_SUBSTITUTION_GOODCASE.py +++ b/test/pytest/pytestfiles/test_03_PARAMETER_SUBSTITUTION_GOODCASE.py @@ -16,9 +16,9 @@ # # test_03_PARAMETER_SUBSTITUTION_GOODCASE.py # -# XC-CT/ECA3-Queckenstedt +# XC-HWP/ESW3-Queckenstedt # -# 20.11.2023 - 15:42:16 +# 25.10.2024 - 20:31:28 # # -------------------------------------------------------------------------------------------------------------- @@ -40,7 +40,7 @@ def test_JPP_0200(self, Description): # -------------------------------------------------------------------------------------------------------------- # Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string @pytest.mark.parametrize( - "Description", ["JSON file with nested parameter / string parameter substitution in parameter name",] + "Description", ["JSON file with nested parameter / index parameter substitution in parameter value / standard notation",] ) def test_JPP_0201(self, Description): nReturn = CExecute.Execute("JPP_0201") @@ -48,7 +48,7 @@ def test_JPP_0201(self, Description): # -------------------------------------------------------------------------------------------------------------- # Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string @pytest.mark.parametrize( - "Description", ["JSON file with nested parameter / index parameter substitution in parameter name / standard notation",] + "Description", ["JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation",] ) def test_JPP_0202(self, Description): nReturn = CExecute.Execute("JPP_0202") @@ -56,7 +56,7 @@ def test_JPP_0202(self, Description): # -------------------------------------------------------------------------------------------------------------- # Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string @pytest.mark.parametrize( - "Description", ["JSON file with nested parameter / index parameter substitution in parameter name / dotdict notation",] + "Description", ["JSON file with nested parameter / key parameter substitution in parameter value / standard notation",] ) def test_JPP_0203(self, Description): nReturn = CExecute.Execute("JPP_0203") @@ -64,49 +64,9 @@ def test_JPP_0203(self, Description): # -------------------------------------------------------------------------------------------------------------- # Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string @pytest.mark.parametrize( - "Description", ["JSON file with nested parameter / index parameter substitution in parameter value / standard notation",] + "Description", ["JSON file with nested parameter / key parameter substitution in parameter value / dotdict notation",] ) def test_JPP_0204(self, Description): nReturn = CExecute.Execute("JPP_0204") assert nReturn == 0 -# -------------------------------------------------------------------------------------------------------------- - # Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string - @pytest.mark.parametrize( - "Description", ["JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation",] - ) - def test_JPP_0205(self, Description): - nReturn = CExecute.Execute("JPP_0205") - assert nReturn == 0 -# -------------------------------------------------------------------------------------------------------------- - # Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string - @pytest.mark.parametrize( - "Description", ["JSON file with nested parameter / key parameter substitution in parameter name / standard notation",] - ) - def test_JPP_0206(self, Description): - nReturn = CExecute.Execute("JPP_0206") - assert nReturn == 0 -# -------------------------------------------------------------------------------------------------------------- - # Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string - @pytest.mark.parametrize( - "Description", ["JSON file with nested parameter / key parameter substitution in parameter name / dotdict notation",] - ) - def test_JPP_0207(self, Description): - nReturn = CExecute.Execute("JPP_0207") - assert nReturn == 0 -# -------------------------------------------------------------------------------------------------------------- - # Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string - @pytest.mark.parametrize( - "Description", ["JSON file with nested parameter / key parameter substitution in parameter value / standard notation",] - ) - def test_JPP_0208(self, Description): - nReturn = CExecute.Execute("JPP_0208") - assert nReturn == 0 -# -------------------------------------------------------------------------------------------------------------- - # Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string - @pytest.mark.parametrize( - "Description", ["JSON file with nested parameter / key parameter substitution in parameter value / dotdict notation",] - ) - def test_JPP_0209(self, Description): - nReturn = CExecute.Execute("JPP_0209") - assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_04_PARAMETER_SUBSTITUTION_BADCASE.py b/test/pytest/pytestfiles/test_04_PARAMETER_SUBSTITUTION_BADCASE.py index e5b06561..b71553cb 100644 --- a/test/pytest/pytestfiles/test_04_PARAMETER_SUBSTITUTION_BADCASE.py +++ b/test/pytest/pytestfiles/test_04_PARAMETER_SUBSTITUTION_BADCASE.py @@ -16,9 +16,9 @@ # # test_04_PARAMETER_SUBSTITUTION_BADCASE.py # -# XC-CT/ECA3-Queckenstedt +# XC-HWP/ESW3-Queckenstedt # -# 20.03.2024 - 17:07:31 +# 25.10.2024 - 20:31:28 # # -------------------------------------------------------------------------------------------------------------- @@ -40,7 +40,7 @@ def test_JPP_0250(self, Description): # -------------------------------------------------------------------------------------------------------------- # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( - "Description", ["JSON file with nested parameter / string parameter substitution in parameter name / in between parameter not existing",] + "Description", ["JSON file with nested parameter / index parameter substitution in parameter value / standard notation / index parameter not existing",] ) def test_JPP_0251(self, Description): nReturn = CExecute.Execute("JPP_0251") @@ -48,7 +48,7 @@ def test_JPP_0251(self, Description): # -------------------------------------------------------------------------------------------------------------- # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( - "Description", ["JSON file with nested parameter / index parameter substitution in parameter name / standard notation / index parameter not existing",] + "Description", ["JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation / index parameter not existing",] ) def test_JPP_0252(self, Description): nReturn = CExecute.Execute("JPP_0252") @@ -56,7 +56,7 @@ def test_JPP_0252(self, Description): # -------------------------------------------------------------------------------------------------------------- # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( - "Description", ["JSON file with nested parameter / index parameter substitution in parameter name / dotdict notation / index parameter not existing",] + "Description", ["JSON file with nested parameter / key parameter substitution in parameter value / standard notation / variant number not existing",] ) def test_JPP_0253(self, Description): nReturn = CExecute.Execute("JPP_0253") @@ -64,7 +64,7 @@ def test_JPP_0253(self, Description): # -------------------------------------------------------------------------------------------------------------- # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( - "Description", ["JSON file with nested parameter / index parameter substitution in parameter value / standard notation / index parameter not existing",] + "Description", ["JSON file with nested parameter / key parameter substitution in parameter value / dotdict notation / milestone number not existing",] ) def test_JPP_0254(self, Description): nReturn = CExecute.Execute("JPP_0254") @@ -72,7 +72,7 @@ def test_JPP_0254(self, Description): # -------------------------------------------------------------------------------------------------------------- # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( - "Description", ["JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation / index parameter not existing",] + "Description", ["JSON file with substitution of blocked data types inside string values (1)",] ) def test_JPP_0255(self, Description): nReturn = CExecute.Execute("JPP_0255") @@ -80,7 +80,7 @@ def test_JPP_0255(self, Description): # -------------------------------------------------------------------------------------------------------------- # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( - "Description", ["JSON file with nested parameter / key parameter substitution in parameter name / standard notation / variant number not existing",] + "Description", ["JSON file with substitution of blocked data types inside string values (2)",] ) def test_JPP_0256(self, Description): nReturn = CExecute.Execute("JPP_0256") @@ -88,7 +88,7 @@ def test_JPP_0256(self, Description): # -------------------------------------------------------------------------------------------------------------- # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( - "Description", ["JSON file with nested parameter / key parameter substitution in parameter name / dotdict notation / milestone number not existing",] + "Description", ["JSON file with substitution of blocked data types inside string values (3)",] ) def test_JPP_0257(self, Description): nReturn = CExecute.Execute("JPP_0257") @@ -96,7 +96,7 @@ def test_JPP_0257(self, Description): # -------------------------------------------------------------------------------------------------------------- # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( - "Description", ["JSON file with nested parameter / key parameter substitution in parameter value / standard notation / variant number not existing",] + "Description", ["JSON file with substitution of blocked data types inside string values (4)",] ) def test_JPP_0258(self, Description): nReturn = CExecute.Execute("JPP_0258") @@ -104,7 +104,7 @@ def test_JPP_0258(self, Description): # -------------------------------------------------------------------------------------------------------------- # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( - "Description", ["JSON file with nested parameter / key parameter substitution in parameter value / dotdict notation / milestone number not existing",] + "Description", ["JSON file with substitution of blocked data types inside string values (5)",] ) def test_JPP_0259(self, Description): nReturn = CExecute.Execute("JPP_0259") @@ -112,7 +112,7 @@ def test_JPP_0259(self, Description): # -------------------------------------------------------------------------------------------------------------- # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( - "Description", ["JSON file with list parameter substitution in parameter name (composite data types not allowed in names) / (1)",] + "Description", ["JSON file with substitution of blocked data types inside string values (6)",] ) def test_JPP_0260(self, Description): nReturn = CExecute.Execute("JPP_0260") @@ -120,7 +120,7 @@ def test_JPP_0260(self, Description): # -------------------------------------------------------------------------------------------------------------- # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( - "Description", ["JSON file with list parameter substitution in parameter name (composite data types not allowed in names) / (2)",] + "Description", ["JSON file with substitution of blocked data types inside string values (7)",] ) def test_JPP_0261(self, Description): nReturn = CExecute.Execute("JPP_0261") @@ -128,7 +128,7 @@ def test_JPP_0261(self, Description): # -------------------------------------------------------------------------------------------------------------- # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( - "Description", ["JSON file with dictionary parameter substitution in parameter name (composite data types not allowed in names) / (1)",] + "Description", ["JSON file with substitution of blocked data types inside string values (8)",] ) def test_JPP_0262(self, Description): nReturn = CExecute.Execute("JPP_0262") @@ -136,7 +136,7 @@ def test_JPP_0262(self, Description): # -------------------------------------------------------------------------------------------------------------- # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( - "Description", ["JSON file with dictionary parameter substitution in parameter name (composite data types not allowed in names) / (2)",] + "Description", ["JSON file with substitution of blocked data types inside string values (9)",] ) def test_JPP_0263(self, Description): nReturn = CExecute.Execute("JPP_0263") @@ -144,7 +144,7 @@ def test_JPP_0263(self, Description): # -------------------------------------------------------------------------------------------------------------- # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( - "Description", ["JSON file with list parameter substitution in key name (composite data types not allowed in names) / (1)",] + "Description", ["JSON file with blocked dynamic key names (1)",] ) def test_JPP_0264(self, Description): nReturn = CExecute.Execute("JPP_0264") @@ -152,7 +152,7 @@ def test_JPP_0264(self, Description): # -------------------------------------------------------------------------------------------------------------- # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( - "Description", ["JSON file with list parameter substitution in key name (composite data types not allowed in names) / (2)",] + "Description", ["JSON file with blocked dynamic key names (2)",] ) def test_JPP_0265(self, Description): nReturn = CExecute.Execute("JPP_0265") @@ -160,7 +160,7 @@ def test_JPP_0265(self, Description): # -------------------------------------------------------------------------------------------------------------- # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( - "Description", ["JSON file with dictionary parameter substitution in key name (composite data types not allowed in names) / (1)",] + "Description", ["JSON file with blocked dynamic key names (3)",] ) def test_JPP_0266(self, Description): nReturn = CExecute.Execute("JPP_0266") @@ -168,7 +168,7 @@ def test_JPP_0266(self, Description): # -------------------------------------------------------------------------------------------------------------- # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( - "Description", ["JSON file with dictionary parameter substitution in key name (composite data types not allowed in names) / (2)",] + "Description", ["JSON file with blocked dynamic key names (4)",] ) def test_JPP_0267(self, Description): nReturn = CExecute.Execute("JPP_0267") @@ -176,9 +176,57 @@ def test_JPP_0267(self, Description): # -------------------------------------------------------------------------------------------------------------- # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( - "Description", ["JSON file containing a list; list index is defined by a parameter and wrapped in single quotes",] + "Description", ["JSON file with blocked dynamic key names (5)",] + ) + def test_JPP_0268(self, Description): + nReturn = CExecute.Execute("JPP_0268") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with blocked dynamic key names (6)",] + ) + def test_JPP_0269(self, Description): + nReturn = CExecute.Execute("JPP_0269") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with blocked dynamic key names (7)",] ) def test_JPP_0270(self, Description): nReturn = CExecute.Execute("JPP_0270") assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with blocked dynamic key names (8)",] + ) + def test_JPP_0271(self, Description): + nReturn = CExecute.Execute("JPP_0271") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with blocked dynamic key names (9)",] + ) + def test_JPP_0272(self, Description): + nReturn = CExecute.Execute("JPP_0272") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with blocked dynamic key names (10)",] + ) + def test_JPP_0273(self, Description): + nReturn = CExecute.Execute("JPP_0273") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with blocked dynamic key names (11)",] + ) + def test_JPP_0274(self, Description): + nReturn = CExecute.Execute("JPP_0274") + assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_05_VALUE_DETECTION_GOODCASE.py b/test/pytest/pytestfiles/test_05_VALUE_DETECTION_GOODCASE.py index 12c81122..8cc52f05 100644 --- a/test/pytest/pytestfiles/test_05_VALUE_DETECTION_GOODCASE.py +++ b/test/pytest/pytestfiles/test_05_VALUE_DETECTION_GOODCASE.py @@ -16,9 +16,9 @@ # # test_05_VALUE_DETECTION_GOODCASE.py # -# XC-CT/ECA3-Queckenstedt +# XC-HWP/ESW3-Queckenstedt # -# 24.01.2024 - 13:56:16 +# 25.10.2024 - 20:31:28 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_06_VALUE_DETECTION_BADCASE.py b/test/pytest/pytestfiles/test_06_VALUE_DETECTION_BADCASE.py index 216473b4..a901df27 100644 --- a/test/pytest/pytestfiles/test_06_VALUE_DETECTION_BADCASE.py +++ b/test/pytest/pytestfiles/test_06_VALUE_DETECTION_BADCASE.py @@ -16,9 +16,9 @@ # # test_06_VALUE_DETECTION_BADCASE.py # -# XC-CT/ECA3-Queckenstedt +# XC-HWP/ESW3-Queckenstedt # -# 20.11.2023 - 15:42:16 +# 25.10.2024 - 20:31:28 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_07_NAMING_CONVENTION_GOODCASE.py b/test/pytest/pytestfiles/test_07_NAMING_CONVENTION_GOODCASE.py new file mode 100644 index 00000000..d8fac789 --- /dev/null +++ b/test/pytest/pytestfiles/test_07_NAMING_CONVENTION_GOODCASE.py @@ -0,0 +1,40 @@ +# ************************************************************************************************************** +# Copyright 2020-2023 Robert Bosch GmbH +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# -------------------------------------------------------------------------------------------------------------- +# +# test_07_NAMING_CONVENTION_GOODCASE.py +# +# XC-HWP/ESW3-Queckenstedt +# +# 25.10.2024 - 20:31:28 +# +# -------------------------------------------------------------------------------------------------------------- + +import pytest +from pytestlibs.CExecute import CExecute + +# -------------------------------------------------------------------------------------------------------------- + +class Test_NAMING_CONVENTION_GOODCASE: + +# -------------------------------------------------------------------------------------------------------------- + # Expected: All names are accepted (in definition and in reference) + @pytest.mark.parametrize( + "Description", ["JSON file with several parameter names w.r.t. the naming convention",] + ) + def test_JPP_0400(self, Description): + nReturn = CExecute.Execute("JPP_0400") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_07_COMPOSITE_EXPRESSIONS_GOODCASE.py b/test/pytest/pytestfiles/test_08_COMPOSITE_EXPRESSIONS_GOODCASE.py similarity index 98% rename from test/pytest/pytestfiles/test_07_COMPOSITE_EXPRESSIONS_GOODCASE.py rename to test/pytest/pytestfiles/test_08_COMPOSITE_EXPRESSIONS_GOODCASE.py index f47a71c3..7940b512 100644 --- a/test/pytest/pytestfiles/test_07_COMPOSITE_EXPRESSIONS_GOODCASE.py +++ b/test/pytest/pytestfiles/test_08_COMPOSITE_EXPRESSIONS_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_07_COMPOSITE_EXPRESSIONS_GOODCASE.py +# test_08_COMPOSITE_EXPRESSIONS_GOODCASE.py # -# XC-CT/ECA3-Queckenstedt +# XC-HWP/ESW3-Queckenstedt # -# 08.04.2024 - 14:47:37 +# 25.10.2024 - 20:31:28 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_08_COMPOSITE_EXPRESSIONS_BADCASE.py b/test/pytest/pytestfiles/test_09_COMPOSITE_EXPRESSIONS_BADCASE.py similarity index 97% rename from test/pytest/pytestfiles/test_08_COMPOSITE_EXPRESSIONS_BADCASE.py rename to test/pytest/pytestfiles/test_09_COMPOSITE_EXPRESSIONS_BADCASE.py index f3762099..5f4fad9f 100644 --- a/test/pytest/pytestfiles/test_08_COMPOSITE_EXPRESSIONS_BADCASE.py +++ b/test/pytest/pytestfiles/test_09_COMPOSITE_EXPRESSIONS_BADCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_08_COMPOSITE_EXPRESSIONS_BADCASE.py +# test_09_COMPOSITE_EXPRESSIONS_BADCASE.py # -# XC-CT/ECA3-Queckenstedt +# XC-HWP/ESW3-Queckenstedt # -# 06.03.2024 - 15:51:02 +# 25.10.2024 - 20:31:28 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_09_CODE_COMMENTS_GOODCASE.py b/test/pytest/pytestfiles/test_10_CODE_COMMENTS_GOODCASE.py similarity index 95% rename from test/pytest/pytestfiles/test_09_CODE_COMMENTS_GOODCASE.py rename to test/pytest/pytestfiles/test_10_CODE_COMMENTS_GOODCASE.py index 4a314c92..f6691e0a 100644 --- a/test/pytest/pytestfiles/test_09_CODE_COMMENTS_GOODCASE.py +++ b/test/pytest/pytestfiles/test_10_CODE_COMMENTS_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_09_CODE_COMMENTS_GOODCASE.py +# test_10_CODE_COMMENTS_GOODCASE.py # -# XC-CT/ECA3-Queckenstedt +# XC-HWP/ESW3-Queckenstedt # -# 18.10.2023 - 17:37:45 +# 25.10.2024 - 20:31:28 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_10_COMMON_SYNTAX_VIOLATIONS_BADCASE.py b/test/pytest/pytestfiles/test_11_COMMON_SYNTAX_VIOLATIONS_BADCASE.py similarity index 97% rename from test/pytest/pytestfiles/test_10_COMMON_SYNTAX_VIOLATIONS_BADCASE.py rename to test/pytest/pytestfiles/test_11_COMMON_SYNTAX_VIOLATIONS_BADCASE.py index 015e71b2..d9bbfa14 100644 --- a/test/pytest/pytestfiles/test_10_COMMON_SYNTAX_VIOLATIONS_BADCASE.py +++ b/test/pytest/pytestfiles/test_11_COMMON_SYNTAX_VIOLATIONS_BADCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_10_COMMON_SYNTAX_VIOLATIONS_BADCASE.py +# test_11_COMMON_SYNTAX_VIOLATIONS_BADCASE.py # -# XC-CT/ECA3-Queckenstedt +# XC-HWP/ESW3-Queckenstedt # -# 10.10.2023 - 13:31:11 +# 25.10.2024 - 20:31:28 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_11_IMPLICIT_CREATION_GOODCASE.py b/test/pytest/pytestfiles/test_12_IMPLICIT_CREATION_GOODCASE.py similarity index 97% rename from test/pytest/pytestfiles/test_11_IMPLICIT_CREATION_GOODCASE.py rename to test/pytest/pytestfiles/test_12_IMPLICIT_CREATION_GOODCASE.py index 288a499a..10cc388a 100644 --- a/test/pytest/pytestfiles/test_11_IMPLICIT_CREATION_GOODCASE.py +++ b/test/pytest/pytestfiles/test_12_IMPLICIT_CREATION_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_11_IMPLICIT_CREATION_GOODCASE.py +# test_12_IMPLICIT_CREATION_GOODCASE.py # -# XC-CT/ECA3-Queckenstedt +# XC-HWP/ESW3-Queckenstedt # -# 17.04.2024 - 20:03:38 +# 25.10.2024 - 20:31:28 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_12_IMPLICIT_CREATION_BADCASE.py b/test/pytest/pytestfiles/test_13_IMPLICIT_CREATION_BADCASE.py similarity index 98% rename from test/pytest/pytestfiles/test_12_IMPLICIT_CREATION_BADCASE.py rename to test/pytest/pytestfiles/test_13_IMPLICIT_CREATION_BADCASE.py index 2bf499e9..ebea1965 100644 --- a/test/pytest/pytestfiles/test_12_IMPLICIT_CREATION_BADCASE.py +++ b/test/pytest/pytestfiles/test_13_IMPLICIT_CREATION_BADCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_12_IMPLICIT_CREATION_BADCASE.py +# test_13_IMPLICIT_CREATION_BADCASE.py # -# XC-CT/ECA3-Queckenstedt +# XC-HWP/ESW3-Queckenstedt # -# 10.01.2024 - 12:25:22 +# 25.10.2024 - 20:31:28 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_13_CYCLIC_IMPORTS_BADCASE.py b/test/pytest/pytestfiles/test_14_CYCLIC_IMPORTS_BADCASE.py similarity index 96% rename from test/pytest/pytestfiles/test_13_CYCLIC_IMPORTS_BADCASE.py rename to test/pytest/pytestfiles/test_14_CYCLIC_IMPORTS_BADCASE.py index c38a70a3..63ba8d9a 100644 --- a/test/pytest/pytestfiles/test_13_CYCLIC_IMPORTS_BADCASE.py +++ b/test/pytest/pytestfiles/test_14_CYCLIC_IMPORTS_BADCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_13_CYCLIC_IMPORTS_BADCASE.py +# test_14_CYCLIC_IMPORTS_BADCASE.py # -# XC-CT/ECA3-Queckenstedt +# XC-HWP/ESW3-Queckenstedt # -# 09.01.2024 - 11:50:58 +# 25.10.2024 - 20:31:28 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_14_PATH_FORMATS_GOODCASE.py b/test/pytest/pytestfiles/test_15_PATH_FORMATS_GOODCASE.py similarity index 95% rename from test/pytest/pytestfiles/test_14_PATH_FORMATS_GOODCASE.py rename to test/pytest/pytestfiles/test_15_PATH_FORMATS_GOODCASE.py index 089c0276..7f72340e 100644 --- a/test/pytest/pytestfiles/test_14_PATH_FORMATS_GOODCASE.py +++ b/test/pytest/pytestfiles/test_15_PATH_FORMATS_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_14_PATH_FORMATS_GOODCASE.py +# test_15_PATH_FORMATS_GOODCASE.py # -# XC-CT/ECA3-Queckenstedt +# XC-HWP/ESW3-Queckenstedt # -# 09.01.2024 - 11:50:58 +# 25.10.2024 - 20:31:28 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_15_BLOCKED_SLICING_BADCASE.py b/test/pytest/pytestfiles/test_16_BLOCKED_SLICING_BADCASE.py similarity index 98% rename from test/pytest/pytestfiles/test_15_BLOCKED_SLICING_BADCASE.py rename to test/pytest/pytestfiles/test_16_BLOCKED_SLICING_BADCASE.py index 90db7958..15ea20ac 100644 --- a/test/pytest/pytestfiles/test_15_BLOCKED_SLICING_BADCASE.py +++ b/test/pytest/pytestfiles/test_16_BLOCKED_SLICING_BADCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_15_BLOCKED_SLICING_BADCASE.py +# test_16_BLOCKED_SLICING_BADCASE.py # -# XC-CT/ECA3-Queckenstedt +# XC-HWP/ESW3-Queckenstedt # -# 25.03.2024 - 11:42:32 +# 25.10.2024 - 20:31:28 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_16_NESTED_LISTS_GOODCASE.py b/test/pytest/pytestfiles/test_17_NESTED_LISTS_GOODCASE.py similarity index 95% rename from test/pytest/pytestfiles/test_16_NESTED_LISTS_GOODCASE.py rename to test/pytest/pytestfiles/test_17_NESTED_LISTS_GOODCASE.py index 8ff1947b..a57ee943 100644 --- a/test/pytest/pytestfiles/test_16_NESTED_LISTS_GOODCASE.py +++ b/test/pytest/pytestfiles/test_17_NESTED_LISTS_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_16_NESTED_LISTS_GOODCASE.py +# test_17_NESTED_LISTS_GOODCASE.py # -# XC-CT/ECA3-Queckenstedt +# XC-HWP/ESW3-Queckenstedt # -# 17.04.2024 - 17:34:52 +# 25.10.2024 - 20:31:28 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_17_STRING_INDICES_GOODCASE.py b/test/pytest/pytestfiles/test_18_STRING_INDICES_GOODCASE.py similarity index 95% rename from test/pytest/pytestfiles/test_17_STRING_INDICES_GOODCASE.py rename to test/pytest/pytestfiles/test_18_STRING_INDICES_GOODCASE.py index d372bdb4..337a3b86 100644 --- a/test/pytest/pytestfiles/test_17_STRING_INDICES_GOODCASE.py +++ b/test/pytest/pytestfiles/test_18_STRING_INDICES_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_17_STRING_INDICES_GOODCASE.py +# test_18_STRING_INDICES_GOODCASE.py # -# XC-CT/ECA3-Queckenstedt +# XC-HWP/ESW3-Queckenstedt # -# 17.04.2024 - 17:34:52 +# 25.10.2024 - 20:31:28 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_18_NOT_EXISTING_PARAMETERS_BADCASE.py b/test/pytest/pytestfiles/test_19_NOT_EXISTING_PARAMETERS_BADCASE.py similarity index 98% rename from test/pytest/pytestfiles/test_18_NOT_EXISTING_PARAMETERS_BADCASE.py rename to test/pytest/pytestfiles/test_19_NOT_EXISTING_PARAMETERS_BADCASE.py index 927bdc26..eab1e72d 100644 --- a/test/pytest/pytestfiles/test_18_NOT_EXISTING_PARAMETERS_BADCASE.py +++ b/test/pytest/pytestfiles/test_19_NOT_EXISTING_PARAMETERS_BADCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_18_NOT_EXISTING_PARAMETERS_BADCASE.py +# test_19_NOT_EXISTING_PARAMETERS_BADCASE.py # -# XC-CT/ECA3-Queckenstedt +# XC-HWP/ESW3-Queckenstedt # -# 17.04.2024 - 17:34:52 +# 25.10.2024 - 20:31:28 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_19_LINE_BREAKS_GOODCASE.py b/test/pytest/pytestfiles/test_20_LINE_BREAKS_GOODCASE.py similarity index 95% rename from test/pytest/pytestfiles/test_19_LINE_BREAKS_GOODCASE.py rename to test/pytest/pytestfiles/test_20_LINE_BREAKS_GOODCASE.py index f63d22e3..f70070e9 100644 --- a/test/pytest/pytestfiles/test_19_LINE_BREAKS_GOODCASE.py +++ b/test/pytest/pytestfiles/test_20_LINE_BREAKS_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_19_LINE_BREAKS_GOODCASE.py +# test_20_LINE_BREAKS_GOODCASE.py # -# XC-CT/ECA3-Queckenstedt +# XC-HWP/ESW3-Queckenstedt # -# 17.04.2024 - 17:34:52 +# 25.10.2024 - 20:31:28 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_20_SELF_ASSIGNMENTS_GOODCASE.py b/test/pytest/pytestfiles/test_21_SELF_ASSIGNMENTS_GOODCASE.py similarity index 94% rename from test/pytest/pytestfiles/test_20_SELF_ASSIGNMENTS_GOODCASE.py rename to test/pytest/pytestfiles/test_21_SELF_ASSIGNMENTS_GOODCASE.py index cc277239..9e9d73d5 100644 --- a/test/pytest/pytestfiles/test_20_SELF_ASSIGNMENTS_GOODCASE.py +++ b/test/pytest/pytestfiles/test_21_SELF_ASSIGNMENTS_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_20_SELF_ASSIGNMENTS_GOODCASE.py +# test_21_SELF_ASSIGNMENTS_GOODCASE.py # -# XC-CT/ECA3-Queckenstedt +# XC-HWP/ESW3-Queckenstedt # -# 17.04.2024 - 17:34:52 +# 25.10.2024 - 20:31:28 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_21_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py b/test/pytest/pytestfiles/test_22_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py similarity index 95% rename from test/pytest/pytestfiles/test_21_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py rename to test/pytest/pytestfiles/test_22_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py index f253da11..8f5509fa 100644 --- a/test/pytest/pytestfiles/test_21_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py +++ b/test/pytest/pytestfiles/test_22_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_21_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py +# test_22_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py # -# XC-CT/ECA3-Queckenstedt +# XC-HWP/ESW3-Queckenstedt # -# 17.04.2024 - 17:34:52 +# 25.10.2024 - 20:31:28 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_23_PARAMETER_SCOPE_GOODCASE.py b/test/pytest/pytestfiles/test_23_PARAMETER_SCOPE_GOODCASE.py new file mode 100644 index 00000000..1ca0190e --- /dev/null +++ b/test/pytest/pytestfiles/test_23_PARAMETER_SCOPE_GOODCASE.py @@ -0,0 +1,72 @@ +# ************************************************************************************************************** +# Copyright 2020-2023 Robert Bosch GmbH +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# -------------------------------------------------------------------------------------------------------------- +# +# test_23_PARAMETER_SCOPE_GOODCASE.py +# +# XC-HWP/ESW3-Queckenstedt +# +# 25.10.2024 - 20:31:28 +# +# -------------------------------------------------------------------------------------------------------------- + +import pytest +from pytestlibs.CExecute import CExecute + +# -------------------------------------------------------------------------------------------------------------- + +class Test_PARAMETER_SCOPE_GOODCASE: + +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns expected value + @pytest.mark.parametrize( + "Description", ["JSON file with nested dictionary, in which a parameter is overwritten (1)",] + ) + def test_JPP_2000(self, Description): + nReturn = CExecute.Execute("JPP_2000") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns expected value + @pytest.mark.parametrize( + "Description", ["JSON file with nested dictionary, in which a parameter is overwritten (2)",] + ) + def test_JPP_2001(self, Description): + nReturn = CExecute.Execute("JPP_2001") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns expected value + @pytest.mark.parametrize( + "Description", ["JSON file with nested dictionary, in which a parameter is overwritten (3)",] + ) + def test_JPP_2002(self, Description): + nReturn = CExecute.Execute("JPP_2002") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns expected value + @pytest.mark.parametrize( + "Description", ["JSON file with nested dictionary, in which a parameter is overwritten (4)",] + ) + def test_JPP_2003(self, Description): + nReturn = CExecute.Execute("JPP_2003") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns expected value + @pytest.mark.parametrize( + "Description", ["JSON file with nested dictionary, in which a parameter is overwritten (8)",] + ) + def test_JPP_2007(self, Description): + nReturn = CExecute.Execute("JPP_2007") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_24_PARAMETER_SCOPE_BADCASE.py b/test/pytest/pytestfiles/test_24_PARAMETER_SCOPE_BADCASE.py new file mode 100644 index 00000000..d4f8b4c0 --- /dev/null +++ b/test/pytest/pytestfiles/test_24_PARAMETER_SCOPE_BADCASE.py @@ -0,0 +1,96 @@ +# ************************************************************************************************************** +# Copyright 2020-2023 Robert Bosch GmbH +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# -------------------------------------------------------------------------------------------------------------- +# +# test_24_PARAMETER_SCOPE_BADCASE.py +# +# XC-HWP/ESW3-Queckenstedt +# +# 25.10.2024 - 20:31:28 +# +# -------------------------------------------------------------------------------------------------------------- + +import pytest +from pytestlibs.CExecute import CExecute + +# -------------------------------------------------------------------------------------------------------------- + +class Test_PARAMETER_SCOPE_BADCASE: + +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns expected value + @pytest.mark.parametrize( + "Description", ["JSON file containing a parameter with missing scope (1)",] + ) + def test_JPP_2500(self, Description): + nReturn = CExecute.Execute("JPP_2500") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns expected value + @pytest.mark.parametrize( + "Description", ["JSON file containing a parameter with missing scope (2)",] + ) + def test_JPP_2501(self, Description): + nReturn = CExecute.Execute("JPP_2501") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns expected value + @pytest.mark.parametrize( + "Description", ["JSON file containing a parameter with missing scope (3)",] + ) + def test_JPP_2502(self, Description): + nReturn = CExecute.Execute("JPP_2502") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns expected value + @pytest.mark.parametrize( + "Description", ["JSON file containing a parameter with missing scope (4)",] + ) + def test_JPP_2503(self, Description): + nReturn = CExecute.Execute("JPP_2503") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns expected value + @pytest.mark.parametrize( + "Description", ["JSON file containing a parameter with missing scope (5)",] + ) + def test_JPP_2504(self, Description): + nReturn = CExecute.Execute("JPP_2504") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns expected value + @pytest.mark.parametrize( + "Description", ["JSON file containing a parameter with missing scope (7)",] + ) + def test_JPP_2506(self, Description): + nReturn = CExecute.Execute("JPP_2506") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns expected value + @pytest.mark.parametrize( + "Description", ["JSON file containing a parameter with missing scope (8)",] + ) + def test_JPP_2507(self, Description): + nReturn = CExecute.Execute("JPP_2507") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns expected value + @pytest.mark.parametrize( + "Description", ["JSON file containing a parameter with missing scope (9)",] + ) + def test_JPP_2508(self, Description): + nReturn = CExecute.Execute("JPP_2508") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- diff --git a/test/testconfig/TestConfig.py b/test/testconfig/TestConfig.py index 697902f1..59b655e2 100644 --- a/test/testconfig/TestConfig.py +++ b/test/testconfig/TestConfig.py @@ -22,7 +22,7 @@ # # -------------------------------------------------------------------------------------------------------------- # -# 17.04.2024 +# 25.10.2024 # # !!! Temporarily tests are deactivated by the following line commented out: # # # listofdictUsecases.append(dictUsecase) @@ -666,141 +666,13 @@ # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0201" -dictUsecase['DESCRIPTION'] = "JSON file with nested parameter / string parameter substitution in parameter name" -dictUsecase['EXPECTATION'] = "JsonPreprocessor creates a new string with all dollar operator expressions resolved as string" -dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" # Note: Parameter subsitution in key names is blocked (Ticket 270) -dictUsecase['SUBSECTION'] = "GOODCASE" -dictUsecase['HINT'] = None -dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0201.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = None -dictUsecase['EXPECTEDRETURN'] = """ -[DOTDICT] (21/1) > {variant_1} [STR] : 'VARIANT_1' -[DOTDICT] (21/2) > {variant_2} [STR] : 'VARIANT_2' -[DOTDICT] (21/3) > {list_variant_numbers} [LIST] (2/1) > [INT] : 1 -[DOTDICT] (21/3) > {list_variant_numbers} [LIST] (2/2) > [INT] : 2 -[DOTDICT] (21/4) > {list_variant_index} [INT] : 0 -[DOTDICT] (21/5) > {variant_number} [STR] : '1' -[DOTDICT] (21/6) > {dict_variants} [DOTDICT] (2/1) > {variant_1} [STR] : 'VARIANT_1' -[DOTDICT] (21/6) > {dict_variants} [DOTDICT] (2/2) > {variant_2} [STR] : 'VARIANT_2' -[DOTDICT] (21/7) > {variant_key_1} [STR] : 'variant_1' -[DOTDICT] (21/8) > {INNERMOST_VARIANT_VALUE} [STR] : 'RIA' -[DOTDICT] (21/9) > {ARIAN} [STR] : 'ARIAN' -[DOTDICT] (21/10) > {VARIANT} [STR] : 'VARIANT' -[DOTDICT] (21/11) > {milestone_1} [STR] : 'MILESTONE_1' -[DOTDICT] (21/12) > {milestone_3} [STR] : 'MILESTONE_3' -[DOTDICT] (21/13) > {list_milestone_numbers} [LIST] (3/1) > [INT] : 1 -[DOTDICT] (21/13) > {list_milestone_numbers} [LIST] (3/2) > [INT] : 2 -[DOTDICT] (21/13) > {list_milestone_numbers} [LIST] (3/3) > [INT] : 3 -[DOTDICT] (21/14) > {list_milestone_index} [INT] : 1 -[DOTDICT] (21/15) > {milestone_number} [STR] : '2' -[DOTDICT] (21/16) > {dict_milestones} [DOTDICT] (3/1) > {milestone_1} [STR] : 'MILESTONE_1' -[DOTDICT] (21/16) > {dict_milestones} [DOTDICT] (3/2) > {milestone_2} [STR] : 'MILESTONE_2' -[DOTDICT] (21/16) > {dict_milestones} [DOTDICT] (3/3) > {milestone_3} [STR] : 'MILESTONE_3' -[DOTDICT] (21/17) > {milestone_key_2} [STR] : 'milestone_2' -[DOTDICT] (21/18) > {innermost_milestone_name} [STR] : 'est' -[DOTDICT] (21/19) > {ilesto} [STR] : 'ilesto' -[DOTDICT] (21/20) > {milestone} [STR] : 'milestone' -[DOTDICT] (21/21) > {milestone_2} [STR] : 'MILESTONE_2 (new value)' -""" -listofdictUsecases.append(dictUsecase) -del dictUsecase -# -------------------------------------------------------------------------------------------------------------- -dictUsecase = {} -dictUsecase['TESTID'] = "JPP_0202" -dictUsecase['DESCRIPTION'] = "JSON file with nested parameter / index parameter substitution in parameter name / standard notation" -dictUsecase['EXPECTATION'] = "JsonPreprocessor creates a new string with all dollar operator expressions resolved as string" -dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" # Note: Parameter subsitution in key names is blocked (Ticket 270) -dictUsecase['SUBSECTION'] = "GOODCASE" -dictUsecase['HINT'] = None -dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0202.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = None -dictUsecase['EXPECTEDRETURN'] = """ -[DOTDICT] (22/1) > {variant_1} [STR] : 'VARIANT_1' -[DOTDICT] (22/2) > {variant_2} [STR] : 'VARIANT_2' -[DOTDICT] (22/3) > {list_variant_numbers} [LIST] (2/1) > [INT] : 1 -[DOTDICT] (22/3) > {list_variant_numbers} [LIST] (2/2) > [INT] : 2 -[DOTDICT] (22/4) > {list_variant_index} [INT] : 0 -[DOTDICT] (22/5) > {variant_number} [STR] : '1' -[DOTDICT] (22/6) > {dict_variants} [DOTDICT] (2/1) > {variant_1} [STR] : 'VARIANT_1' -[DOTDICT] (22/6) > {dict_variants} [DOTDICT] (2/2) > {variant_2} [STR] : 'VARIANT_2' -[DOTDICT] (22/7) > {variant_key_1} [STR] : 'variant_1' -[DOTDICT] (22/8) > {INNERMOST_VARIANT_VALUE} [STR] : 'RIA' -[DOTDICT] (22/9) > {ARIAN} [STR] : 'ARIAN' -[DOTDICT] (22/10) > {VARIANT} [STR] : 'VARIANT' -[DOTDICT] (22/11) > {milestone_1} [STR] : 'MILESTONE_1' -[DOTDICT] (22/12) > {milestone_2} [STR] : 'MILESTONE_2' -[DOTDICT] (22/13) > {milestone_3} [STR] : 'MILESTONE_3' -[DOTDICT] (22/14) > {list_milestone_numbers} [LIST] (3/1) > [INT] : 1 -[DOTDICT] (22/14) > {list_milestone_numbers} [LIST] (3/2) > [INT] : 2 -[DOTDICT] (22/14) > {list_milestone_numbers} [LIST] (3/3) > [INT] : 3 -[DOTDICT] (22/15) > {list_milestone_index} [INT] : 1 -[DOTDICT] (22/16) > {milestone_number} [STR] : '2' -[DOTDICT] (22/17) > {dict_milestones} [DOTDICT] (3/1) > {milestone_1} [STR] : 'MILESTONE_1' -[DOTDICT] (22/17) > {dict_milestones} [DOTDICT] (3/2) > {milestone_2} [STR] : 'MILESTONE_2' -[DOTDICT] (22/17) > {dict_milestones} [DOTDICT] (3/3) > {milestone_3} [STR] : 'MILESTONE_3' -[DOTDICT] (22/18) > {milestone_key_2} [STR] : 'milestone_2' -[DOTDICT] (22/19) > {innermost_milestone_name} [STR] : 'est' -[DOTDICT] (22/20) > {ilesto} [STR] : 'ilesto' -[DOTDICT] (22/21) > {milestone} [STR] : 'milestone' -[DOTDICT] (22/22) > {VAR_VARIANT_1_MS_MILESTONE_2_param} [STR] : 'value' -""" -listofdictUsecases.append(dictUsecase) -del dictUsecase -# -------------------------------------------------------------------------------------------------------------- -dictUsecase = {} -dictUsecase['TESTID'] = "JPP_0203" -dictUsecase['DESCRIPTION'] = "JSON file with nested parameter / index parameter substitution in parameter name / dotdict notation" -dictUsecase['EXPECTATION'] = "JsonPreprocessor creates a new string with all dollar operator expressions resolved as string" -dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" # Note: Parameter subsitution in key names is blocked (Ticket 270) -dictUsecase['SUBSECTION'] = "GOODCASE" -dictUsecase['HINT'] = None -dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0203.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = None -dictUsecase['EXPECTEDRETURN'] = """ -[DOTDICT] (22/1) > {variant_1} [STR] : 'VARIANT_1' -[DOTDICT] (22/2) > {variant_2} [STR] : 'VARIANT_2' -[DOTDICT] (22/3) > {list_variant_numbers} [LIST] (2/1) > [INT] : 1 -[DOTDICT] (22/3) > {list_variant_numbers} [LIST] (2/2) > [INT] : 2 -[DOTDICT] (22/4) > {list_variant_index} [INT] : 0 -[DOTDICT] (22/5) > {variant_number} [STR] : '1' -[DOTDICT] (22/6) > {dict_variants} [DOTDICT] (2/1) > {variant_1} [STR] : 'VARIANT_1' -[DOTDICT] (22/6) > {dict_variants} [DOTDICT] (2/2) > {variant_2} [STR] : 'VARIANT_2' -[DOTDICT] (22/7) > {variant_key_1} [STR] : 'variant_1' -[DOTDICT] (22/8) > {INNERMOST_VARIANT_VALUE} [STR] : 'RIA' -[DOTDICT] (22/9) > {ARIAN} [STR] : 'ARIAN' -[DOTDICT] (22/10) > {VARIANT} [STR] : 'VARIANT' -[DOTDICT] (22/11) > {milestone_1} [STR] : 'MILESTONE_1' -[DOTDICT] (22/12) > {milestone_2} [STR] : 'MILESTONE_2' -[DOTDICT] (22/13) > {milestone_3} [STR] : 'MILESTONE_3' -[DOTDICT] (22/14) > {list_milestone_numbers} [LIST] (3/1) > [INT] : 1 -[DOTDICT] (22/14) > {list_milestone_numbers} [LIST] (3/2) > [INT] : 2 -[DOTDICT] (22/14) > {list_milestone_numbers} [LIST] (3/3) > [INT] : 3 -[DOTDICT] (22/15) > {list_milestone_index} [INT] : 1 -[DOTDICT] (22/16) > {milestone_number} [STR] : '2' -[DOTDICT] (22/17) > {dict_milestones} [DOTDICT] (3/1) > {milestone_1} [STR] : 'MILESTONE_1' -[DOTDICT] (22/17) > {dict_milestones} [DOTDICT] (3/2) > {milestone_2} [STR] : 'MILESTONE_2' -[DOTDICT] (22/17) > {dict_milestones} [DOTDICT] (3/3) > {milestone_3} [STR] : 'MILESTONE_3' -[DOTDICT] (22/18) > {milestone_key_2} [STR] : 'milestone_2' -[DOTDICT] (22/19) > {innermost_milestone_name} [STR] : 'est' -[DOTDICT] (22/20) > {ilesto} [STR] : 'ilesto' -[DOTDICT] (22/21) > {milestone} [STR] : 'milestone' -[DOTDICT] (22/22) > {VAR_VARIANT_1_MS_MILESTONE_2_param} [STR] : 'value' -""" -listofdictUsecases.append(dictUsecase) -del dictUsecase -# -------------------------------------------------------------------------------------------------------------- -dictUsecase = {} -dictUsecase['TESTID'] = "JPP_0204" dictUsecase['DESCRIPTION'] = "JSON file with nested parameter / index parameter substitution in parameter value / standard notation" dictUsecase['EXPECTATION'] = "JsonPreprocessor creates a new string with all dollar operator expressions resolved as string" dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" dictUsecase['SUBSECTION'] = "GOODCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0204.jsonp" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0201.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None dictUsecase['EXPECTEDRETURN'] = """ [DOTDICT] (22/1) > {variant_1} [STR] : 'VARIANT_1' @@ -836,14 +708,14 @@ del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_0205" +dictUsecase['TESTID'] = "JPP_0202" dictUsecase['DESCRIPTION'] = "JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation" dictUsecase['EXPECTATION'] = "JsonPreprocessor creates a new string with all dollar operator expressions resolved as string" dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" dictUsecase['SUBSECTION'] = "GOODCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0205.jsonp" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0202.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None dictUsecase['EXPECTEDRETURN'] = """ [DOTDICT] (22/1) > {variant_1} [STR] : 'VARIANT_1' @@ -879,100 +751,14 @@ del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_0206" -dictUsecase['DESCRIPTION'] = "JSON file with nested parameter / key parameter substitution in parameter name / standard notation" -dictUsecase['EXPECTATION'] = "JsonPreprocessor creates a new string with all dollar operator expressions resolved as string" -dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" # Note: Parameter subsitution in key names is blocked (Ticket 270) -dictUsecase['SUBSECTION'] = "GOODCASE" -dictUsecase['HINT'] = None -dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0206.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = None -dictUsecase['EXPECTEDRETURN'] = """ -[DOTDICT] (22/1) > {variant_1} [STR] : 'VARIANT_1' -[DOTDICT] (22/2) > {variant_2} [STR] : 'VARIANT_2' -[DOTDICT] (22/3) > {list_variant_numbers} [LIST] (2/1) > [INT] : 1 -[DOTDICT] (22/3) > {list_variant_numbers} [LIST] (2/2) > [INT] : 2 -[DOTDICT] (22/4) > {list_variant_index} [INT] : 0 -[DOTDICT] (22/5) > {variant_number} [STR] : '1' -[DOTDICT] (22/6) > {dict_variants} [DOTDICT] (2/1) > {variant_1} [STR] : 'VARIANT_1' -[DOTDICT] (22/6) > {dict_variants} [DOTDICT] (2/2) > {variant_2} [STR] : 'VARIANT_2' -[DOTDICT] (22/7) > {variant_key_1} [STR] : 'variant_1' -[DOTDICT] (22/8) > {INNERMOST_VARIANT_VALUE} [STR] : 'RIA' -[DOTDICT] (22/9) > {ARIAN} [STR] : 'ARIAN' -[DOTDICT] (22/10) > {VARIANT} [STR] : 'VARIANT' -[DOTDICT] (22/11) > {milestone_1} [STR] : 'MILESTONE_1' -[DOTDICT] (22/12) > {milestone_2} [STR] : 'MILESTONE_2' -[DOTDICT] (22/13) > {milestone_3} [STR] : 'MILESTONE_3' -[DOTDICT] (22/14) > {list_milestone_numbers} [LIST] (3/1) > [INT] : 1 -[DOTDICT] (22/14) > {list_milestone_numbers} [LIST] (3/2) > [INT] : 2 -[DOTDICT] (22/14) > {list_milestone_numbers} [LIST] (3/3) > [INT] : 3 -[DOTDICT] (22/15) > {list_milestone_index} [INT] : 1 -[DOTDICT] (22/16) > {milestone_number} [STR] : '2' -[DOTDICT] (22/17) > {dict_milestones} [DOTDICT] (3/1) > {milestone_1} [STR] : 'MILESTONE_1' -[DOTDICT] (22/17) > {dict_milestones} [DOTDICT] (3/2) > {milestone_2} [STR] : 'MILESTONE_2' -[DOTDICT] (22/17) > {dict_milestones} [DOTDICT] (3/3) > {milestone_3} [STR] : 'MILESTONE_3' -[DOTDICT] (22/18) > {milestone_key_2} [STR] : 'milestone_2' -[DOTDICT] (22/19) > {innermost_milestone_name} [STR] : 'est' -[DOTDICT] (22/20) > {ilesto} [STR] : 'ilesto' -[DOTDICT] (22/21) > {milestone} [STR] : 'milestone' -[DOTDICT] (22/22) > {VAR_VARIANT_1_MS_MILESTONE_2_param} [STR] : 'value' -""" -listofdictUsecases.append(dictUsecase) -del dictUsecase -# -------------------------------------------------------------------------------------------------------------- -dictUsecase = {} -dictUsecase['TESTID'] = "JPP_0207" -dictUsecase['DESCRIPTION'] = "JSON file with nested parameter / key parameter substitution in parameter name / dotdict notation" -dictUsecase['EXPECTATION'] = "JsonPreprocessor creates a new string with all dollar operator expressions resolved as string" -dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" # Note: Parameter subsitution in key names is blocked (Ticket 270) -dictUsecase['SUBSECTION'] = "GOODCASE" -dictUsecase['HINT'] = None -dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0207.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = None -dictUsecase['EXPECTEDRETURN'] = """ -[DOTDICT] (22/1) > {variant_1} [STR] : 'VARIANT_1' -[DOTDICT] (22/2) > {variant_2} [STR] : 'VARIANT_2' -[DOTDICT] (22/3) > {list_variant_numbers} [LIST] (2/1) > [INT] : 1 -[DOTDICT] (22/3) > {list_variant_numbers} [LIST] (2/2) > [INT] : 2 -[DOTDICT] (22/4) > {list_variant_index} [INT] : 0 -[DOTDICT] (22/5) > {variant_number} [STR] : '1' -[DOTDICT] (22/6) > {dict_variants} [DOTDICT] (2/1) > {variant_1} [STR] : 'VARIANT_1' -[DOTDICT] (22/6) > {dict_variants} [DOTDICT] (2/2) > {variant_2} [STR] : 'VARIANT_2' -[DOTDICT] (22/7) > {variant_key_1} [STR] : 'variant_1' -[DOTDICT] (22/8) > {INNERMOST_VARIANT_VALUE} [STR] : 'RIA' -[DOTDICT] (22/9) > {ARIAN} [STR] : 'ARIAN' -[DOTDICT] (22/10) > {VARIANT} [STR] : 'VARIANT' -[DOTDICT] (22/11) > {milestone_1} [STR] : 'MILESTONE_1' -[DOTDICT] (22/12) > {milestone_2} [STR] : 'MILESTONE_2' -[DOTDICT] (22/13) > {milestone_3} [STR] : 'MILESTONE_3' -[DOTDICT] (22/14) > {list_milestone_numbers} [LIST] (3/1) > [INT] : 1 -[DOTDICT] (22/14) > {list_milestone_numbers} [LIST] (3/2) > [INT] : 2 -[DOTDICT] (22/14) > {list_milestone_numbers} [LIST] (3/3) > [INT] : 3 -[DOTDICT] (22/15) > {list_milestone_index} [INT] : 1 -[DOTDICT] (22/16) > {milestone_number} [STR] : '2' -[DOTDICT] (22/17) > {dict_milestones} [DOTDICT] (3/1) > {milestone_1} [STR] : 'MILESTONE_1' -[DOTDICT] (22/17) > {dict_milestones} [DOTDICT] (3/2) > {milestone_2} [STR] : 'MILESTONE_2' -[DOTDICT] (22/17) > {dict_milestones} [DOTDICT] (3/3) > {milestone_3} [STR] : 'MILESTONE_3' -[DOTDICT] (22/18) > {milestone_key_2} [STR] : 'milestone_2' -[DOTDICT] (22/19) > {innermost_milestone_name} [STR] : 'est' -[DOTDICT] (22/20) > {ilesto} [STR] : 'ilesto' -[DOTDICT] (22/21) > {milestone} [STR] : 'milestone' -[DOTDICT] (22/22) > {VAR_VARIANT_1_MS_MILESTONE_2_param} [STR] : 'value' -""" -listofdictUsecases.append(dictUsecase) -del dictUsecase -# -------------------------------------------------------------------------------------------------------------- -dictUsecase = {} -dictUsecase['TESTID'] = "JPP_0208" +dictUsecase['TESTID'] = "JPP_0203" dictUsecase['DESCRIPTION'] = "JSON file with nested parameter / key parameter substitution in parameter value / standard notation" dictUsecase['EXPECTATION'] = "JsonPreprocessor creates a new string with all dollar operator expressions resolved as string" dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" dictUsecase['SUBSECTION'] = "GOODCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0208.jsonp" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0203.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None dictUsecase['EXPECTEDRETURN'] = """ [DOTDICT] (22/1) > {variant_1} [STR] : 'VARIANT_1' @@ -1008,14 +794,14 @@ del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_0209" +dictUsecase['TESTID'] = "JPP_0204" dictUsecase['DESCRIPTION'] = "JSON file with nested parameter / key parameter substitution in parameter value / dotdict notation" dictUsecase['EXPECTATION'] = "JsonPreprocessor creates a new string with all dollar operator expressions resolved as string" dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" dictUsecase['SUBSECTION'] = "GOODCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0209.jsonp" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0204.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None dictUsecase['EXPECTEDRETURN'] = """ [DOTDICT] (22/1) > {variant_1} [STR] : 'VARIANT_1' @@ -1050,7 +836,6 @@ listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- -# -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0250" dictUsecase['DESCRIPTION'] = "JSON file with nested parameter / string parameter substitution in parameter value / innermost parameter not existing" @@ -1067,49 +852,49 @@ # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0251" -dictUsecase['DESCRIPTION'] = "JSON file with nested parameter / string parameter substitution in parameter name / in between parameter not existing" +dictUsecase['DESCRIPTION'] = "JSON file with nested parameter / index parameter substitution in parameter value / standard notation / index parameter not existing" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" # Note: Parameter subsitution in key names is blocked (Ticket 270) +dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0251.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "A substitution in key names is not allowed" # "The variable '${IAMNOTEXISTING}' is not available!" +dictUsecase['EXPECTEDEXCEPTION'] = "The parameter '${IAMNOTEXISTING}' is not available!" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0252" -dictUsecase['DESCRIPTION'] = "JSON file with nested parameter / index parameter substitution in parameter name / standard notation / index parameter not existing" +dictUsecase['DESCRIPTION'] = "JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation / index parameter not existing" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" # Note: Parameter subsitution in key names is blocked (Ticket 270) +dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0252.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "A substitution in key names is not allowed" # "The variable '${IAMNOTEXISTING}' is not available!" +dictUsecase['EXPECTEDEXCEPTION'] = "The parameter '${IAMNOTEXISTING}' is not available!" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0253" -dictUsecase['DESCRIPTION'] = "JSON file with nested parameter / index parameter substitution in parameter name / dotdict notation / index parameter not existing" +dictUsecase['DESCRIPTION'] = "JSON file with nested parameter / key parameter substitution in parameter value / standard notation / variant number not existing" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" # Note: Parameter subsitution in key names is blocked (Ticket 270) +dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0253.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "A substitution in key names is not allowed" # "The variable '${IAMNOTEXISTING}' is not available!" +dictUsecase['EXPECTEDEXCEPTION'] = "The parameter '${IAMNOTEXISTING}' is not available!" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0254" -dictUsecase['DESCRIPTION'] = "JSON file with nested parameter / index parameter substitution in parameter value / standard notation / index parameter not existing" +dictUsecase['DESCRIPTION'] = "JSON file with nested parameter / key parameter substitution in parameter value / dotdict notation / milestone number not existing" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" dictUsecase['SUBSECTION'] = "BADCASE" @@ -1123,225 +908,280 @@ # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0255" -dictUsecase['DESCRIPTION'] = "JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation / index parameter not existing" +dictUsecase['DESCRIPTION'] = "JSON file with substitution of blocked data types inside string values (1)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0255.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "The parameter '${IAMNOTEXISTING}' is not available!" +dictUsecase['EXPECTEDEXCEPTION'] = "The substitution of parameter '${testlist}' inside the string value '${testlist}' is not supported! Composite data types like lists and dictionaries cannot be substituted inside strings." dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0256" -dictUsecase['DESCRIPTION'] = "JSON file with nested parameter / key parameter substitution in parameter name / standard notation / variant number not existing" +dictUsecase['DESCRIPTION'] = "JSON file with substitution of blocked data types inside string values (2)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" # Note: Parameter subsitution in key names is blocked (Ticket 270) +dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0256.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "A substitution in key names is not allowed" # "The variable '${IAMNOTEXISTING}' is not available!" +dictUsecase['EXPECTEDEXCEPTION'] = "The substitution of parameter '${testlist}' inside the string value 'A_${testlist}_B' is not supported! Composite data types like lists and dictionaries cannot be substituted inside strings." dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0257" -dictUsecase['DESCRIPTION'] = "JSON file with nested parameter / key parameter substitution in parameter name / dotdict notation / milestone number not existing" +dictUsecase['DESCRIPTION'] = "JSON file with substitution of blocked data types inside string values (3)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" # Note: Parameter subsitution in key names is blocked (Ticket 270) +dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0257.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "A substitution in key names is not allowed" # "The variable '${IAMNOTEXISTING}' is not available!" +dictUsecase['EXPECTEDEXCEPTION'] = "The substitution of parameter '${testdict}' inside the string value '${testdict}' is not supported! Composite data types like lists and dictionaries cannot be substituted inside strings." dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0258" -dictUsecase['DESCRIPTION'] = "JSON file with nested parameter / key parameter substitution in parameter value / standard notation / variant number not existing" +dictUsecase['DESCRIPTION'] = "JSON file with substitution of blocked data types inside string values (4)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0258.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "The parameter '${IAMNOTEXISTING}' is not available!" +dictUsecase['EXPECTEDEXCEPTION'] = "The substitution of parameter '${testdict}' inside the string value 'A_${testdict}_B' is not supported! Composite data types like lists and dictionaries cannot be substituted inside strings." dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0259" -dictUsecase['DESCRIPTION'] = "JSON file with nested parameter / key parameter substitution in parameter value / dotdict notation / milestone number not existing" +dictUsecase['DESCRIPTION'] = "JSON file with substitution of blocked data types inside string values (5)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0259.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "The parameter '${IAMNOTEXISTING}' is not available!" +dictUsecase['EXPECTEDEXCEPTION'] = "The substitution of parameter '${testlist}' inside the string value 'A_${testlist}_${testdict}_B' is not supported! Composite data types like lists and dictionaries cannot be substituted inside strings." dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0260" -dictUsecase['DESCRIPTION'] = "JSON file with list parameter substitution in parameter name (composite data types not allowed in names) / (1)" +dictUsecase['DESCRIPTION'] = "JSON file with substitution of blocked data types inside string values (6)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" # Note: Parameter subsitution in key names is blocked (Ticket 270) +dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0260.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "A substitution in key names is not allowed" # "Found expression '${param}' with at least one parameter of composite data type ('${param}' is of type ). Because of this expression is the name of a parameter, only simple data types are allowed to be substituted inside." +dictUsecase['EXPECTEDEXCEPTION'] = "The substitution of parameter '${testdict}' inside the string value '${testdict}' is not supported! Composite data types like lists and dictionaries cannot be substituted inside strings." dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0261" -dictUsecase['DESCRIPTION'] = "JSON file with list parameter substitution in parameter name (composite data types not allowed in names) / (2)" +dictUsecase['DESCRIPTION'] = "JSON file with substitution of blocked data types inside string values (7)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" # Note: Parameter subsitution in key names is blocked (Ticket 270) +dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0261.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "A substitution in key names is not allowed" # "only simple data types are allowed to be substituted inside." +dictUsecase['EXPECTEDEXCEPTION'] = "The substitution of parameter '${testlist}' inside the string value '${testlist}' is not supported! Composite data types like lists and dictionaries cannot be substituted inside strings." dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0262" -dictUsecase['DESCRIPTION'] = "JSON file with dictionary parameter substitution in parameter name (composite data types not allowed in names) / (1)" +dictUsecase['DESCRIPTION'] = "JSON file with substitution of blocked data types inside string values (8)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" # Note: Parameter subsitution in key names is blocked (Ticket 270) +dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0262.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "A substitution in key names is not allowed" # "Found expression '${param}' with at least one parameter of composite data type ('${param}' is of type ). Because of this expression is the name of a parameter, only simple data types are allowed to be substituted inside." +dictUsecase['EXPECTEDEXCEPTION'] = "The substitution of parameter '${testlist}' inside the string value '${testlist}' is not supported! Composite data types like lists and dictionaries cannot be substituted inside strings." dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0263" -dictUsecase['DESCRIPTION'] = "JSON file with dictionary parameter substitution in parameter name (composite data types not allowed in names) / (2)" +dictUsecase['DESCRIPTION'] = "JSON file with substitution of blocked data types inside string values (9)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" # Note: Parameter subsitution in key names is blocked (Ticket 270) +dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0263.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "A substitution in key names is not allowed" # "only simple data types are allowed to be substituted inside." +dictUsecase['EXPECTEDEXCEPTION'] = "The substitution of parameter '${testdict}' inside the string value '${testdict}' is not supported! Composite data types like lists and dictionaries cannot be substituted inside strings." dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0264" -dictUsecase['DESCRIPTION'] = "JSON file with list parameter substitution in key name (composite data types not allowed in names) / (1)" +dictUsecase['DESCRIPTION'] = "JSON file with blocked dynamic key names (1)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" # Note: Parameter subsitution in key names is blocked (Ticket 270) +dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0264.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "A substitution in key names is not allowed" # "only simple data types are allowed to be substituted inside." +dictUsecase['EXPECTEDEXCEPTION'] = "A substitution in key names is not allowed! Please update the key name \"${param1}\"" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0265" -dictUsecase['DESCRIPTION'] = "JSON file with list parameter substitution in key name (composite data types not allowed in names) / (2)" +dictUsecase['DESCRIPTION'] = "JSON file with blocked dynamic key names (2)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" # Note: Parameter subsitution in key names is blocked (Ticket 270) +dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0265.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "A substitution in key names is not allowed" # "only simple data types are allowed to be substituted inside." +dictUsecase['EXPECTEDEXCEPTION'] = "A substitution in key names is not allowed! Please update the key name \"A.${param1}.B\"" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0266" -dictUsecase['DESCRIPTION'] = "JSON file with dictionary parameter substitution in key name (composite data types not allowed in names) / (1)" +dictUsecase['DESCRIPTION'] = "JSON file with blocked dynamic key names (3)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" # Note: Parameter subsitution in key names is blocked (Ticket 270) +dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0266.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "A substitution in key names is not allowed" # "only simple data types are allowed to be substituted inside." +dictUsecase['EXPECTEDEXCEPTION'] = "A substitution in key names is not allowed! Please update the key name \"${testlist}\"" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0267" -dictUsecase['DESCRIPTION'] = "JSON file with dictionary parameter substitution in key name (composite data types not allowed in names) / (2)" +dictUsecase['DESCRIPTION'] = "JSON file with blocked dynamic key names (4)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" # Note: Parameter subsitution in key names is blocked (Ticket 270) +dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0267.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "A substitution in key names is not allowed" # "only simple data types are allowed to be substituted inside." +dictUsecase['EXPECTEDEXCEPTION'] = "A substitution in key names is not allowed! Please update the key name \"A.${testdict}.B\"" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0268" -dictUsecase['DESCRIPTION'] = "JSON file with dictionary parameter substitution in parameter value (composite data types not allowed in values)" +dictUsecase['DESCRIPTION'] = "JSON file with blocked dynamic key names (5)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0268.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = None # # !!! expectation TODO !!! +dictUsecase['EXPECTEDEXCEPTION'] = "A substitution in key names is not allowed! Please update the key name \"${param1}\"" dictUsecase['EXPECTEDRETURN'] = None -# # # listofdictUsecases.append(dictUsecase) +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0269" -dictUsecase['DESCRIPTION'] = "JSON file with list parameter substitution in parameter value (composite data types not allowed in names)" +dictUsecase['DESCRIPTION'] = "JSON file with blocked dynamic key names (6)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0269.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = None # # !!! expectation TODO !!! +dictUsecase['EXPECTEDEXCEPTION'] = "A substitution in key names is not allowed! Please update the key name \"A.${param1}.B\"" dictUsecase['EXPECTEDRETURN'] = None -# # # listofdictUsecases.append(dictUsecase) +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- -# JPP_0270 does not really belong to PARAMETER_SUBSTITUTION, maybe move to another section dictUsecase = {} dictUsecase['TESTID'] = "JPP_0270" -dictUsecase['DESCRIPTION'] = "JSON file containing a list; list index is defined by a parameter and wrapped in single quotes" +dictUsecase['DESCRIPTION'] = "JSON file with blocked dynamic key names (7)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" # Note: Parameter subsitution in key names is blocked (Ticket 270) +dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" dictUsecase['SUBSECTION'] = "BADCASE" -dictUsecase['HINT'] = "List indices must be of type 'int'" +dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0270.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "A substitution in key names is not allowed" # "expects integer as index. Got string instead in" +dictUsecase['EXPECTEDEXCEPTION'] = "A substitution in key names is not allowed! Please update the key name \"${testlist}\"" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0271" +dictUsecase['DESCRIPTION'] = "JSON file with blocked dynamic key names (8)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0271.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "A substitution in key names is not allowed! Please update the key name \"A.${testdict}.B\"" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0272" +dictUsecase['DESCRIPTION'] = "JSON file with blocked dynamic key names (9)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0272.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "Identified dynamic name of key '${testdict}['${param}']' that does not exist. But new keys can only be created based on hard code names." +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0273" +dictUsecase['DESCRIPTION'] = "JSON file with blocked dynamic key names (10)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0273.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "Identified dynamic name of key '${testdict}[${param}]' that does not exist. But new keys can only be created based on hard code names." +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0274" +dictUsecase['DESCRIPTION'] = "JSON file with blocked dynamic key names (11)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0274.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "Identified dynamic name of key '${testdict.${param}}' that does not exist. But new keys can only be created based on hard code names." dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase @@ -1670,238 +1510,207 @@ dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "VALUE_DETECTION" dictUsecase['SUBSECTION'] = "BADCASE" -dictUsecase['HINT'] = "Checklist rule 3 / pattern 4" -dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0364.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "Invalid expression found" -dictUsecase['EXPECTEDRETURN'] = None -listofdictUsecases.append(dictUsecase) -del dictUsecase -# -------------------------------------------------------------------------------------------------------------- -dictUsecase = {} -dictUsecase['TESTID'] = "JPP_0365" -dictUsecase['DESCRIPTION'] = "JSON file with expression containing more closing elements '}' than opening elements '${' (invalid syntax 5)" -dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "VALUE_DETECTION" -dictUsecase['SUBSECTION'] = "BADCASE" -dictUsecase['HINT'] = "Checklist rule 3 / pattern 5" -dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0365.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "Invalid expression found" -dictUsecase['EXPECTEDRETURN'] = None -listofdictUsecases.append(dictUsecase) -del dictUsecase -# -------------------------------------------------------------------------------------------------------------- -dictUsecase = {} -dictUsecase['TESTID'] = "JPP_0366" -dictUsecase['DESCRIPTION'] = "JSON file with expression containing more closing elements '}' than opening elements '${' (invalid syntax 6)" -dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "VALUE_DETECTION" -dictUsecase['SUBSECTION'] = "BADCASE" -dictUsecase['HINT'] = "Checklist rule 3 / pattern 6" -dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0366.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "Invalid expression found" -dictUsecase['EXPECTEDRETURN'] = None -listofdictUsecases.append(dictUsecase) -del dictUsecase -# -------------------------------------------------------------------------------------------------------------- -dictUsecase = {} -dictUsecase['TESTID'] = "JPP_0367" -dictUsecase['DESCRIPTION'] = "JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (not all nested) (invalid syntax 1)" -dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "VALUE_DETECTION" -dictUsecase['SUBSECTION'] = "BADCASE" -dictUsecase['HINT'] = "Checklist rule 6 / pattern 1" -dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0367.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "The double quotes are missing" -dictUsecase['EXPECTEDRETURN'] = None -listofdictUsecases.append(dictUsecase) -del dictUsecase -# -------------------------------------------------------------------------------------------------------------- -dictUsecase = {} -dictUsecase['TESTID'] = "JPP_0368" -dictUsecase['DESCRIPTION'] = "JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (not all nested) (invalid syntax 2)" -dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "VALUE_DETECTION" -dictUsecase['SUBSECTION'] = "BADCASE" -dictUsecase['HINT'] = "Checklist rule 6 / pattern 2" -dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0368.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "The double quotes are missing" -dictUsecase['EXPECTEDRETURN'] = None -listofdictUsecases.append(dictUsecase) -del dictUsecase -# -------------------------------------------------------------------------------------------------------------- -dictUsecase = {} -dictUsecase['TESTID'] = "JPP_0369" -dictUsecase['DESCRIPTION'] = "JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (not all nested) (invalid syntax 3)" -dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "VALUE_DETECTION" -dictUsecase['SUBSECTION'] = "BADCASE" -dictUsecase['HINT'] = "Checklist rule 6 / pattern 3" -dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0369.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "The double quotes are missing" -dictUsecase['EXPECTEDRETURN'] = None -listofdictUsecases.append(dictUsecase) -del dictUsecase -# -------------------------------------------------------------------------------------------------------------- -dictUsecase = {} -dictUsecase['TESTID'] = "JPP_0370" -dictUsecase['DESCRIPTION'] = "JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (not all nested) (invalid syntax 4)" -dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "VALUE_DETECTION" -dictUsecase['SUBSECTION'] = "BADCASE" -dictUsecase['HINT'] = "Checklist rule 6 / pattern 4" -dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0370.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "The double quotes are missing" -dictUsecase['EXPECTEDRETURN'] = None -listofdictUsecases.append(dictUsecase) -del dictUsecase -# -------------------------------------------------------------------------------------------------------------- -dictUsecase = {} -dictUsecase['TESTID'] = "JPP_0371" -dictUsecase['DESCRIPTION'] = "JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (not all nested) (invalid syntax 5)" -dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "VALUE_DETECTION" -dictUsecase['SUBSECTION'] = "BADCASE" -dictUsecase['HINT'] = "Checklist rule 6 / pattern 5" -dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0371.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "The double quotes are missing" -dictUsecase['EXPECTEDRETURN'] = None -listofdictUsecases.append(dictUsecase) -del dictUsecase -# -------------------------------------------------------------------------------------------------------------- -# -------------------------------------------------------------------------------------------------------------- -dictUsecase = {} -dictUsecase['TESTID'] = "JPP_0450" -dictUsecase['DESCRIPTION'] = "JSON file with parameter name containing not allowed special characters" -dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "NAMING_CONVENTION" -dictUsecase['SUBSECTION'] = "BADCASE" -dictUsecase['HINT'] = None +dictUsecase['HINT'] = "Checklist rule 3 / pattern 4" dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0450.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = None # # !!! expectation TODO / something like: "naming convention violation; allowed characters are ... only"!!! +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0364.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "Invalid expression found" dictUsecase['EXPECTEDRETURN'] = None -# # # listofdictUsecases.append(dictUsecase) +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_0451" -dictUsecase['DESCRIPTION'] = "JSON file with parameter name containing single not allowed special character (1)" +dictUsecase['TESTID'] = "JPP_0365" +dictUsecase['DESCRIPTION'] = "JSON file with expression containing more closing elements '}' than opening elements '${' (invalid syntax 5)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SECTION'] = "VALUE_DETECTION" dictUsecase['SUBSECTION'] = "BADCASE" -dictUsecase['HINT'] = None +dictUsecase['HINT'] = "Checklist rule 3 / pattern 5" dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0451.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = None # # !!! expectation TODO / something like: "naming convention violation; allowed characters are ... only"!!! +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0365.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "Invalid expression found" dictUsecase['EXPECTEDRETURN'] = None -# # # listofdictUsecases.append(dictUsecase) +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_0452" -dictUsecase['DESCRIPTION'] = "JSON file with parameter name containing single not allowed special character (2)" +dictUsecase['TESTID'] = "JPP_0366" +dictUsecase['DESCRIPTION'] = "JSON file with expression containing more closing elements '}' than opening elements '${' (invalid syntax 6)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SECTION'] = "VALUE_DETECTION" dictUsecase['SUBSECTION'] = "BADCASE" -dictUsecase['HINT'] = None +dictUsecase['HINT'] = "Checklist rule 3 / pattern 6" dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0452.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = None # # !!! expectation TODO / something like: "naming convention violation; allowed characters are ... only"!!! +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0366.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "Invalid expression found" dictUsecase['EXPECTEDRETURN'] = None -# # # listofdictUsecases.append(dictUsecase) +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_0453" -dictUsecase['DESCRIPTION'] = "JSON file with parameter name containing single not allowed special character (3)" +dictUsecase['TESTID'] = "JPP_0367" +dictUsecase['DESCRIPTION'] = "JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (not all nested) (invalid syntax 1)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SECTION'] = "VALUE_DETECTION" dictUsecase['SUBSECTION'] = "BADCASE" -dictUsecase['HINT'] = None +dictUsecase['HINT'] = "Checklist rule 6 / pattern 1" dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0453.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = None # # !!! expectation TODO / something like: "naming convention violation; allowed characters are ... only"!!! +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0367.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "The double quotes are missing" dictUsecase['EXPECTEDRETURN'] = None -# # # listofdictUsecases.append(dictUsecase) +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_0454" -dictUsecase['DESCRIPTION'] = "JSON file with parameter name containing single not allowed special character (4)" +dictUsecase['TESTID'] = "JPP_0368" +dictUsecase['DESCRIPTION'] = "JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (not all nested) (invalid syntax 2)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SECTION'] = "VALUE_DETECTION" dictUsecase['SUBSECTION'] = "BADCASE" -dictUsecase['HINT'] = None +dictUsecase['HINT'] = "Checklist rule 6 / pattern 2" dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0454.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = None # # !!! expectation TODO / something like: "naming convention violation; allowed characters are ... only"!!! +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0368.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "The double quotes are missing" dictUsecase['EXPECTEDRETURN'] = None -# # # listofdictUsecases.append(dictUsecase) +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_0455" -dictUsecase['DESCRIPTION'] = "JSON file with parameter name containing single not allowed special character (5)" +dictUsecase['TESTID'] = "JPP_0369" +dictUsecase['DESCRIPTION'] = "JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (not all nested) (invalid syntax 3)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SECTION'] = "VALUE_DETECTION" dictUsecase['SUBSECTION'] = "BADCASE" -dictUsecase['HINT'] = None +dictUsecase['HINT'] = "Checklist rule 6 / pattern 3" dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0455.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = None # # !!! expectation TODO / something like: "naming convention violation; allowed characters are ... only"!!! +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0369.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "The double quotes are missing" dictUsecase['EXPECTEDRETURN'] = None -# # # listofdictUsecases.append(dictUsecase) +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_0456" -dictUsecase['DESCRIPTION'] = "JSON file with parameter name containing single not allowed special character (6)" +dictUsecase['TESTID'] = "JPP_0370" +dictUsecase['DESCRIPTION'] = "JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (not all nested) (invalid syntax 4)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SECTION'] = "VALUE_DETECTION" dictUsecase['SUBSECTION'] = "BADCASE" -dictUsecase['HINT'] = None +dictUsecase['HINT'] = "Checklist rule 6 / pattern 4" dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0456.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = None # # !!! expectation TODO / something like: "naming convention violation; allowed characters are ... only"!!! +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0370.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "The double quotes are missing" dictUsecase['EXPECTEDRETURN'] = None -# # # listofdictUsecases.append(dictUsecase) +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_0457" -dictUsecase['DESCRIPTION'] = "JSON file with parameter name containing single not allowed special character (7)" +dictUsecase['TESTID'] = "JPP_0371" +dictUsecase['DESCRIPTION'] = "JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (not all nested) (invalid syntax 5)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SECTION'] = "VALUE_DETECTION" dictUsecase['SUBSECTION'] = "BADCASE" -dictUsecase['HINT'] = None +dictUsecase['HINT'] = "Checklist rule 6 / pattern 5" dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0457.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = None # # !!! expectation TODO / something like: "naming convention violation; allowed characters are ... only"!!! +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0371.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "The double quotes are missing" dictUsecase['EXPECTEDRETURN'] = None -# # # listofdictUsecases.append(dictUsecase) +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_0458" -dictUsecase['DESCRIPTION'] = "JSON file with parameter name containing single not allowed special character (8)" -dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['TESTID'] = "JPP_0400" +dictUsecase['DESCRIPTION'] = "JSON file with several parameter names w.r.t. the naming convention" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" dictUsecase['SECTION'] = "NAMING_CONVENTION" -dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['SUBSECTION'] = "GOODCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0458.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = None # # !!! expectation TODO / something like: "naming convention violation; allowed characters are ... only"!!! -dictUsecase['EXPECTEDRETURN'] = None -# # # listofdictUsecases.append(dictUsecase) +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0400.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (55/1) > {A} [INT] : 1 +[DOTDICT] (55/2) > {check01} [INT] : 1 +[DOTDICT] (55/3) > {_} [INT] : 3 +[DOTDICT] (55/4) > {check03} [INT] : 3 +[DOTDICT] (55/5) > {Ax} [INT] : 4 +[DOTDICT] (55/6) > {check04} [INT] : 4 +[DOTDICT] (55/7) > {0x} [INT] : 5 +[DOTDICT] (55/8) > {check05} [INT] : 5 +[DOTDICT] (55/9) > {_x} [INT] : 6 +[DOTDICT] (55/10) > {check06} [INT] : 6 +[DOTDICT] (55/11) > {param+1} [INT] : 7 +[DOTDICT] (55/12) > {check07} [INT] : 7 +[DOTDICT] (55/13) > {param-2} [INT] : 8 +[DOTDICT] (55/14) > {check08} [INT] : 8 +[DOTDICT] (55/15) > {param*3} [INT] : 9 +[DOTDICT] (55/16) > {check09} [INT] : 9 +[DOTDICT] (55/17) > {param/4} [INT] : 10 +[DOTDICT] (55/18) > {p01} [DOTDICT] (1/1) > {A} [INT] : 7 +[DOTDICT] (55/19) > {check11} [INT] : 7 +[DOTDICT] (55/20) > {p02} [DOTDICT] (1/1) > {0} [INT] : 8 +[DOTDICT] (55/21) > {check12} [INT] : 8 +[DOTDICT] (55/22) > {p03} [DOTDICT] (1/1) > {_} [INT] : 9 +[DOTDICT] (55/23) > {check13} [INT] : 9 +[DOTDICT] (55/24) > {p04} [DOTDICT] (1/1) > {Ax} [INT] : 10 +[DOTDICT] (55/25) > {check14} [INT] : 10 +[DOTDICT] (55/26) > {p05} [DOTDICT] (1/1) > {0x} [INT] : 11 +[DOTDICT] (55/27) > {check15} [INT] : 11 +[DOTDICT] (55/28) > {p06} [DOTDICT] (1/1) > {_x} [INT] : 12 +[DOTDICT] (55/29) > {check16} [INT] : 12 +[DOTDICT] (55/30) > {p07} [DOTDICT] (1/1) > {param+1} [INT] : 13 +[DOTDICT] (55/31) > {check17} [INT] : 13 +[DOTDICT] (55/32) > {p08} [DOTDICT] (1/1) > {param-2} [INT] : 14 +[DOTDICT] (55/33) > {check18} [INT] : 14 +[DOTDICT] (55/34) > {p09} [DOTDICT] (1/1) > {param*3} [INT] : 15 +[DOTDICT] (55/35) > {check19} [INT] : 15 +[DOTDICT] (55/36) > {p10} [DOTDICT] (1/1) > {param/4} [INT] : 16 +[DOTDICT] (55/37) > {p11} [LIST] (3/1) > [INT] : 1 +[DOTDICT] (55/37) > {p11} [LIST] (3/2) > [DOTDICT] (1/1) > {A} [INT] : 17 +[DOTDICT] (55/37) > {p11} [LIST] (3/3) > [INT] : 2 +[DOTDICT] (55/38) > {check21} [INT] : 17 +[DOTDICT] (55/39) > {p12} [LIST] (3/1) > [INT] : 1 +[DOTDICT] (55/39) > {p12} [LIST] (3/2) > [DOTDICT] (1/1) > {0} [INT] : 18 +[DOTDICT] (55/39) > {p12} [LIST] (3/3) > [INT] : 2 +[DOTDICT] (55/40) > {check22} [INT] : 18 +[DOTDICT] (55/41) > {p13} [LIST] (3/1) > [INT] : 1 +[DOTDICT] (55/41) > {p13} [LIST] (3/2) > [DOTDICT] (1/1) > {_} [INT] : 19 +[DOTDICT] (55/41) > {p13} [LIST] (3/3) > [INT] : 2 +[DOTDICT] (55/42) > {check23} [INT] : 19 +[DOTDICT] (55/43) > {p14} [LIST] (3/1) > [INT] : 1 +[DOTDICT] (55/43) > {p14} [LIST] (3/2) > [DOTDICT] (1/1) > {Ax} [INT] : 20 +[DOTDICT] (55/43) > {p14} [LIST] (3/3) > [INT] : 2 +[DOTDICT] (55/44) > {check24} [INT] : 20 +[DOTDICT] (55/45) > {p15} [LIST] (3/1) > [INT] : 1 +[DOTDICT] (55/45) > {p15} [LIST] (3/2) > [DOTDICT] (1/1) > {0x} [INT] : 21 +[DOTDICT] (55/45) > {p15} [LIST] (3/3) > [INT] : 2 +[DOTDICT] (55/46) > {check25} [INT] : 21 +[DOTDICT] (55/47) > {p16} [LIST] (3/1) > [INT] : 1 +[DOTDICT] (55/47) > {p16} [LIST] (3/2) > [DOTDICT] (1/1) > {_x} [INT] : 22 +[DOTDICT] (55/47) > {p16} [LIST] (3/3) > [INT] : 2 +[DOTDICT] (55/48) > {check26} [INT] : 22 +[DOTDICT] (55/49) > {p17} [LIST] (3/1) > [INT] : 1 +[DOTDICT] (55/49) > {p17} [LIST] (3/2) > [DOTDICT] (1/1) > {param+1} [INT] : 23 +[DOTDICT] (55/49) > {p17} [LIST] (3/3) > [INT] : 2 +[DOTDICT] (55/50) > {check27} [INT] : 23 +[DOTDICT] (55/51) > {p18} [LIST] (3/1) > [INT] : 1 +[DOTDICT] (55/51) > {p18} [LIST] (3/2) > [DOTDICT] (1/1) > {param-2} [INT] : 24 +[DOTDICT] (55/51) > {p18} [LIST] (3/3) > [INT] : 2 +[DOTDICT] (55/52) > {check28} [INT] : 24 +[DOTDICT] (55/53) > {p19} [LIST] (3/1) > [INT] : 1 +[DOTDICT] (55/53) > {p19} [LIST] (3/2) > [DOTDICT] (1/1) > {param*3} [INT] : 25 +[DOTDICT] (55/53) > {p19} [LIST] (3/3) > [INT] : 2 +[DOTDICT] (55/54) > {check29} [INT] : 25 +[DOTDICT] (55/55) > {p20} [LIST] (3/1) > [INT] : 1 +[DOTDICT] (55/55) > {p20} [LIST] (3/2) > [DOTDICT] (1/1) > {param/4} [INT] : 26 +[DOTDICT] (55/55) > {p20} [LIST] (3/3) > [INT] : 2 +""" +listofdictUsecases.append(dictUsecase) del dictUsecase +# -------------------------------------------------------------------------------------------------------------- + + + + # -------------------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} @@ -2018,7 +1827,7 @@ dictUsecase['SUBSECTION'] = "GOODCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0504.jsonp" # current issue: Expecting value: line 20 column 14 (char 1088)'! +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0504.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None dictUsecase['EXPECTEDRETURN'] = """ [DOTDICT] (20/1) > {param1} [DOTDICT] (1/1) > {A} [DOTDICT] (1/1) > {B} [DOTDICT] (1/1) > {C} [DOTDICT] (1/1) > {D} [FLOAT] : 1.23 @@ -2208,30 +2017,25 @@ dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0513.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None dictUsecase['EXPECTEDRETURN'] = """ -[DOTDICT] (21/1) > {intparam} [INT] : 0 -[DOTDICT] (21/2) > {stringparam} [STR] : 'A' -[DOTDICT] (21/3) > {listparam} [LIST] (2/1) > [STR] : 'C' -[DOTDICT] (21/3) > {listparam} [LIST] (2/2) > [STR] : 'D' -[DOTDICT] (21/4) > {dictparam} [DOTDICT] (3/1) > {0} [INT] : 3 -[DOTDICT] (21/4) > {dictparam} [DOTDICT] (3/2) > {A} [INT] : 5 -[DOTDICT] (21/4) > {dictparam} [DOTDICT] (3/3) > {B} [INT] : 6 -[DOTDICT] (21/5) > {val01} [STR] : 'A' -[DOTDICT] (21/6) > {val02} [STR] : 'B' -[DOTDICT] (21/7) > {val03} [INT] : 0 -[DOTDICT] (21/8) > {val04} [INT] : 1 -[DOTDICT] (21/9) > {val05} [INT] : 1 -[DOTDICT] (21/10) > {val06} [INT] : 1 -[DOTDICT] (21/11) > {val07} [STR] : 'A' -[DOTDICT] (21/12) > {val08} [STR] : 'B' -[DOTDICT] (21/13) > {val09} [STR] : '0' -[DOTDICT] (21/14) > {val10} [STR] : '1' -[DOTDICT] (21/15) > {val11} [STR] : '1' -[DOTDICT] (21/16) > {val12} [STR] : '1' -[DOTDICT] (21/17) > {C} [STR] : 'E' -[DOTDICT] (21/18) > {D} [STR] : 'F' -[DOTDICT] (21/19) > {3} [INT] : 3 -[DOTDICT] (21/20) > {5} [INT] : 5 -[DOTDICT] (21/21) > {6} [INT] : 6""" +[DOTDICT] (16/1) > {intparam} [INT] : 0 +[DOTDICT] (16/2) > {stringparam} [STR] : 'A' +[DOTDICT] (16/3) > {listparam} [LIST] (2/1) > [STR] : 'C' +[DOTDICT] (16/3) > {listparam} [LIST] (2/2) > [STR] : 'D' +[DOTDICT] (16/4) > {dictparam} [DOTDICT] (3/1) > {0} [INT] : 3 +[DOTDICT] (16/4) > {dictparam} [DOTDICT] (3/2) > {A} [INT] : 5 +[DOTDICT] (16/4) > {dictparam} [DOTDICT] (3/3) > {B} [INT] : 6 +[DOTDICT] (16/5) > {val01} [STR] : 'A' +[DOTDICT] (16/6) > {val02} [STR] : 'B' +[DOTDICT] (16/7) > {val03} [INT] : 0 +[DOTDICT] (16/8) > {val04} [INT] : 1 +[DOTDICT] (16/9) > {val05} [INT] : 1 +[DOTDICT] (16/10) > {val06} [INT] : 1 +[DOTDICT] (16/11) > {val07} [STR] : 'A' +[DOTDICT] (16/12) > {val08} [STR] : 'B' +[DOTDICT] (16/13) > {val09} [STR] : '0' +[DOTDICT] (16/14) > {val10} [STR] : '1' +[DOTDICT] (16/15) > {val11} [STR] : '1' +[DOTDICT] (16/16) > {val12} [STR] : '1'""" listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- @@ -2611,10 +2415,10 @@ dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1004.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None dictUsecase['EXPECTEDRETURN'] = """ -[DOTDICT] (4/1) > {testdict4} [DOTDICT] (1/1) > {subKey1} [DOTDICT] (1/1) > {subKey2} [DOTDICT] (1/1) > {subKey3} [DOTDICT] (1/1) > {subKey4} [INT] : 20 -[DOTDICT] (4/2) > {testdict1} [DOTDICT] (1/1) > {subKey1} [DOTDICT] (1/1) > {subKey2} [DOTDICT] (1/1) > {subKey3} [DOTDICT] (1/1) > {subKey4} [INT] : 4 -[DOTDICT] (4/3) > {testdict2} [DOTDICT] (1/1) > {subKey1} [DOTDICT] (1/1) > {subKey2} [DOTDICT] (1/1) > {subKey3} [DOTDICT] (1/1) > {subKey4} [INT] : 9 -[DOTDICT] (4/4) > {testdict3} [DOTDICT] (1/1) > {subKey1} [DOTDICT] (1/1) > {subKey2} [DOTDICT] (1/1) > {subKey3} [DOTDICT] (1/1) > {subKey4} [INT] : 10 +[DOTDICT] (4/1) > {testdict3} [DOTDICT] (1/1) > {subKey1} [DOTDICT] (1/1) > {subKey2} [DOTDICT] (1/1) > {subKey3} [DOTDICT] (1/1) > {subKey4} [INT] : 30 +[DOTDICT] (4/2) > {testdict4} [DOTDICT] (1/1) > {subKey1} [DOTDICT] (1/1) > {subKey2} [DOTDICT] (1/1) > {subKey3} [DOTDICT] (1/1) > {subKey4} [INT] : 40 +[DOTDICT] (4/3) > {testdict1} [DOTDICT] (1/1) > {subKey1} [DOTDICT] (1/1) > {subKey2} [DOTDICT] (1/1) > {subKey3} [DOTDICT] (1/1) > {subKey4} [INT] : 4 +[DOTDICT] (4/4) > {testdict2} [DOTDICT] (1/1) > {subKey1} [DOTDICT] (1/1) > {subKey2} [DOTDICT] (1/1) > {subKey3} [DOTDICT] (1/1) > {subKey4} [INT] : 8 """ listofdictUsecases.append(dictUsecase) del dictUsecase @@ -2629,7 +2433,7 @@ dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1050.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "Identified dynamic name of key" # Update based on new requirement about dynamic key names 270 +dictUsecase['EXPECTEDEXCEPTION'] = "Identified dynamic name of key" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase @@ -2643,7 +2447,7 @@ dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1051.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "Identified dynamic name of key" # Update based on new requirement about dynamic key names 270 +dictUsecase['EXPECTEDEXCEPTION'] = "Identified dynamic name of key" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase @@ -2657,7 +2461,7 @@ dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1052.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "Identified dynamic name of key" # Update based on new requirement about dynamic key names 270 +dictUsecase['EXPECTEDEXCEPTION'] = "Identified dynamic name of key" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase @@ -2713,7 +2517,7 @@ dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1056.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "Identified dynamic name of key" # Update based on new requirement about dynamic key names 270 +dictUsecase['EXPECTEDEXCEPTION'] = "Identified dynamic name of key" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase @@ -2727,7 +2531,7 @@ dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1057.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "Identified dynamic name of key" # Update based on new requirement about dynamic key names 270 +dictUsecase['EXPECTEDEXCEPTION'] = "Identified dynamic name of key" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase @@ -2741,7 +2545,7 @@ dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1058.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "Identified dynamic name of key" # Update based on new requirement about dynamic key names 270 +dictUsecase['EXPECTEDEXCEPTION'] = "Identified dynamic name of key" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase @@ -3497,5 +3301,264 @@ listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- - +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_2000" +dictUsecase['DESCRIPTION'] = "JSON file with nested dictionary, in which a parameter is overwritten (1)" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['SECTION'] = "PARAMETER_SCOPE" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2000.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (2/1) > {param} [INT] : 1 +[DOTDICT] (2/2) > {params} [DOTDICT] (1/1) > {001} [DOTDICT] (1/1) > {param} [INT] : 3 +""" +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_2001" +dictUsecase['DESCRIPTION'] = "JSON file with nested dictionary, in which a parameter is overwritten (2)" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['SECTION'] = "PARAMETER_SCOPE" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2001.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (2/1) > {param} [INT] : 1 +[DOTDICT] (2/2) > {params} [DOTDICT] (1/1) > {001} [DOTDICT] (1/1) > {param} [INT] : 3 +""" +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_2002" +dictUsecase['DESCRIPTION'] = "JSON file with nested dictionary, in which a parameter is overwritten (3)" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['SECTION'] = "PARAMETER_SCOPE" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2002.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (2/1) > {params} [DOTDICT] (1/1) > {001} [DOTDICT] (1/1) > {param} [INT] : 2 +[DOTDICT] (2/2) > {param} [INT] : 3 +""" +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_2003" +dictUsecase['DESCRIPTION'] = "JSON file with nested dictionary, in which a parameter is overwritten (4)" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['SECTION'] = "PARAMETER_SCOPE" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2003.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (2/1) > {params} [DOTDICT] (1/1) > {001} [DOTDICT] (1/1) > {param} [INT] : 2 +[DOTDICT] (2/2) > {param} [INT] : 3 +""" +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_2004" +dictUsecase['DESCRIPTION'] = "JSON file with nested dictionary, in which a parameter is overwritten (5)" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['SECTION'] = "PARAMETER_SCOPE" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2004.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # https://github.com/test-fullautomation/python-jsonpreprocessor/issues/349 +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_2005" +dictUsecase['DESCRIPTION'] = "JSON file with nested dictionary, in which a parameter is overwritten (6)" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['SECTION'] = "PARAMETER_SCOPE" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2005.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # https://github.com/test-fullautomation/python-jsonpreprocessor/issues/349 +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_2006" +dictUsecase['DESCRIPTION'] = "JSON file with nested dictionary, in which a parameter is overwritten (7)" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['SECTION'] = "PARAMETER_SCOPE" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2006.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # https://github.com/test-fullautomation/python-jsonpreprocessor/issues/349 +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_2007" +dictUsecase['DESCRIPTION'] = "JSON file with nested dictionary, in which a parameter is overwritten (8)" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['SECTION'] = "PARAMETER_SCOPE" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2007.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (2/1) > {C} [INT] : 1 +[DOTDICT] (2/2) > {params} [LIST] (3/1) > [INT] : 2 +[DOTDICT] (2/2) > {params} [LIST] (3/2) > [DOTDICT] (2/1) > {A} [INT] : 3 +[DOTDICT] (2/2) > {params} [LIST] (3/2) > [DOTDICT] (2/2) > {B} [LIST] (2/1) > [DOTDICT] (2/1) > {C} [INT] : 10 +[DOTDICT] (2/2) > {params} [LIST] (3/2) > [DOTDICT] (2/2) > {B} [LIST] (2/1) > [DOTDICT] (2/2) > {D} [INT] : 5 +[DOTDICT] (2/2) > {params} [LIST] (3/2) > [DOTDICT] (2/2) > {B} [LIST] (2/2) > [INT] : 6 +[DOTDICT] (2/2) > {params} [LIST] (3/3) > [INT] : 7 +""" +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_2500" +dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (1)" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['SECTION'] = "PARAMETER_SCOPE" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2500.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = """'Could not resolve expression '${param}'. The based parameter 'param' is not defined yet! Use the ' : ' syntax to create a new based parameter.'""" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_2501" +dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (2)" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['SECTION'] = "PARAMETER_SCOPE" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2501.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = """'A key with name '${param}' does not exist at this position. Use the ' : ' syntax to create a new key.'""" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_2502" +dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (3)" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['SECTION'] = "PARAMETER_SCOPE" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2502.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = """'Missing scope for parameter '${param}'. To change the value of this parameter, an absolute path must be used: '${params}['001']['param']' or '${params.001.param}'.'""" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_2503" +dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (4)" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['SECTION'] = "PARAMETER_SCOPE" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2503.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = """'A key with name '${params}['001']' does not exist at this position. Use the ' : ' syntax to create a new key.'""" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_2504" +dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (5)" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['SECTION'] = "PARAMETER_SCOPE" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2504.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = """'A key with name '${params.001}' does not exist at this position. Use the ' : ' syntax to create a new key.'""" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_2505" +dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (6)" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['SECTION'] = "PARAMETER_SCOPE" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2505.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # https://github.com/test-fullautomation/python-jsonpreprocessor/issues/349 +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_2506" +dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (7)" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['SECTION'] = "PARAMETER_SCOPE" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2506.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = """'A key with name '${C}' does not exist at this position. Use the ' : ' syntax to create a new key.'""" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_2507" +dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (8)" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['SECTION'] = "PARAMETER_SCOPE" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2507.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = """'A key with name '${params}[1]['B'][0]['C']' does not exist at this position. Use the ' : ' syntax to create a new key.'""" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_2508" +dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (9)" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['SECTION'] = "PARAMETER_SCOPE" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2508.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = """'A key with name '${params.1.B.0.C}' does not exist at this position. Use the ' : ' syntax to create a new key.'""" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------------------------------- diff --git a/test/testfiles/import/cyclic.1/cyclic.2/cyclic.3/jpp-test_config_cyclic.3.jsonp b/test/testfiles/import/cyclic.1/cyclic.2/cyclic.3/jpp-test_config_cyclic.3.jsonp index 33ddf3b7..3e42ad4b 100644 --- a/test/testfiles/import/cyclic.1/cyclic.2/cyclic.3/jpp-test_config_cyclic.3.jsonp +++ b/test/testfiles/import/cyclic.1/cyclic.2/cyclic.3/jpp-test_config_cyclic.3.jsonp @@ -1,4 +1,4 @@ -// Copyright 2020-2023 Robert Bosch GmbH +// Copyright 2020-2024 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/testfiles/import/cyclic.1/cyclic.2/jpp-test_config_cyclic.2.jsonp b/test/testfiles/import/cyclic.1/cyclic.2/jpp-test_config_cyclic.2.jsonp index b999f984..34f6b87d 100644 --- a/test/testfiles/import/cyclic.1/cyclic.2/jpp-test_config_cyclic.2.jsonp +++ b/test/testfiles/import/cyclic.1/cyclic.2/jpp-test_config_cyclic.2.jsonp @@ -1,4 +1,4 @@ -// Copyright 2020-2023 Robert Bosch GmbH +// Copyright 2020-2024 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/testfiles/import/cyclic.1/jpp-test_config_cyclic.1.jsonp b/test/testfiles/import/cyclic.1/jpp-test_config_cyclic.1.jsonp index 27eaa1ea..3db20098 100644 --- a/test/testfiles/import/cyclic.1/jpp-test_config_cyclic.1.jsonp +++ b/test/testfiles/import/cyclic.1/jpp-test_config_cyclic.1.jsonp @@ -1,4 +1,4 @@ -// Copyright 2020-2023 Robert Bosch GmbH +// Copyright 2020-2024 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/testfiles/import/import.1/import.1.1/jpp-test_config_implicit_creation.1.1.1.jsonp b/test/testfiles/import/import.1/import.1.1/jpp-test_config_implicit_creation.1.1.1.jsonp index fe64d20c..d9d52696 100644 --- a/test/testfiles/import/import.1/import.1.1/jpp-test_config_implicit_creation.1.1.1.jsonp +++ b/test/testfiles/import/import.1/import.1.1/jpp-test_config_implicit_creation.1.1.1.jsonp @@ -1,4 +1,4 @@ -// Copyright 2020-2023 Robert Bosch GmbH +// Copyright 2020-2024 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/testfiles/import/import.1/import.1.1/jpp-test_config_relative_jsonfile_path.jsonp b/test/testfiles/import/import.1/import.1.1/jpp-test_config_relative_jsonfile_path.jsonp index 002061ae..27cb99b7 100644 --- a/test/testfiles/import/import.1/import.1.1/jpp-test_config_relative_jsonfile_path.jsonp +++ b/test/testfiles/import/import.1/import.1.1/jpp-test_config_relative_jsonfile_path.jsonp @@ -1,4 +1,4 @@ -// Copyright 2020-2023 Robert Bosch GmbH +// Copyright 2020-2024 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/testfiles/import/import.1/jpp-test_config_implicit_creation.1.1.jsonp b/test/testfiles/import/import.1/jpp-test_config_implicit_creation.1.1.jsonp index 1a57b9e4..fdef993d 100644 --- a/test/testfiles/import/import.1/jpp-test_config_implicit_creation.1.1.jsonp +++ b/test/testfiles/import/import.1/jpp-test_config_implicit_creation.1.1.jsonp @@ -1,4 +1,4 @@ -// Copyright 2020-2023 Robert Bosch GmbH +// Copyright 2020-2024 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/testfiles/import/jpp-test_config_implicit_creation.1.jsonp b/test/testfiles/import/jpp-test_config_implicit_creation.1.jsonp index 11d3414f..f2f70c25 100644 --- a/test/testfiles/import/jpp-test_config_implicit_creation.1.jsonp +++ b/test/testfiles/import/jpp-test_config_implicit_creation.1.jsonp @@ -1,4 +1,4 @@ -// Copyright 2020-2023 Robert Bosch GmbH +// Copyright 2020-2024 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/testfiles/jpp-test_config_0201.jsonp b/test/testfiles/jpp-test_config_0201.jsonp index f0ffe227..ef0a744e 100644 --- a/test/testfiles/jpp-test_config_0201.jsonp +++ b/test/testfiles/jpp-test_config_0201.jsonp @@ -15,7 +15,6 @@ { // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", - // Updated the key name due to enhancement 270 - Dynamic key names shall be blocked - // "${m${il${innermost_milestone_name}o}ne}_${milestone_number}" : "MILESTONE_2 (new value)" - ${milestone_2} : "MILESTONE_2 (new value)" + // + "param" : "VAR_${variant_${list_variant_numbers}[${list_variant_index}]}_MS_${milestone_${list_milestone_numbers}[${list_milestone_index}]} value" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0202.jsonp b/test/testfiles/jpp-test_config_0202.jsonp index 0c4f59b1..1d12ca21 100644 --- a/test/testfiles/jpp-test_config_0202.jsonp +++ b/test/testfiles/jpp-test_config_0202.jsonp @@ -15,7 +15,6 @@ { // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", - // Updated key name due to enhancement 270 - Dynamic key names shall be blocked - // "VAR_${variant_${list_variant_numbers}[${list_variant_index}]}_MS_${milestone_${list_milestone_numbers}[${list_milestone_index}]}_param" : "value" - ${VAR_VARIANT_1_MS_MILESTONE_2_param} : "value" + // + "param" : "VAR_${variant_${list_variant_numbers.${list_variant_index}}}_MS_${milestone_${list_milestone_numbers.${list_milestone_index}}} value" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0203.jsonp b/test/testfiles/jpp-test_config_0203.jsonp index ae53c12a..fad626a3 100644 --- a/test/testfiles/jpp-test_config_0203.jsonp +++ b/test/testfiles/jpp-test_config_0203.jsonp @@ -15,7 +15,6 @@ { // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", - // Updated key name due to enhancement 270 - Dynamic key names shall be blocked - // "VAR_${variant_${list_variant_numbers.${list_variant_index}}}_MS_${milestone_${list_milestone_numbers.${list_milestone_index}}}_param" : "value" - ${VAR_VARIANT_1_MS_MILESTONE_2_param} : "value" + // + "param" : "VAR_${dict_variants}['${variant_key_${variant_number}}']_MS_${dict_milestones}['${milestone_key_${milestone_number}}'] value" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0204.jsonp b/test/testfiles/jpp-test_config_0204.jsonp index ef0a744e..a3a4517e 100644 --- a/test/testfiles/jpp-test_config_0204.jsonp +++ b/test/testfiles/jpp-test_config_0204.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "param" : "VAR_${variant_${list_variant_numbers}[${list_variant_index}]}_MS_${milestone_${list_milestone_numbers}[${list_milestone_index}]} value" + "param" : "VAR_${dict_variants.${variant_key_${variant_number}}}_MS_${dict_milestones.${milestone_key_${milestone_number}}} value" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0205.jsonp b/test/testfiles/jpp-test_config_0205.jsonp deleted file mode 100644 index 1d12ca21..00000000 --- a/test/testfiles/jpp-test_config_0205.jsonp +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2020-2024 Robert Bosch GmbH -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -//************************************************************************** -{ - // taking over the already defined basic data types - "[import]" : "./jpp-test_config_testdata_1.jsonp", - // - "param" : "VAR_${variant_${list_variant_numbers.${list_variant_index}}}_MS_${milestone_${list_milestone_numbers.${list_milestone_index}}} value" -} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0206.jsonp b/test/testfiles/jpp-test_config_0206.jsonp deleted file mode 100644 index 587d9429..00000000 --- a/test/testfiles/jpp-test_config_0206.jsonp +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2020-2024 Robert Bosch GmbH -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -//************************************************************************** -{ - // taking over the already defined basic data types - "[import]" : "./jpp-test_config_testdata_1.jsonp", - // Updated key name due to enhancement 270 - Dynamic key names shall be blocked - // "VAR_${dict_variants}['${variant_key_${variant_number}}']_MS_${dict_milestones}['${milestone_key_${milestone_number}}']_param" : "value" - ${VAR_VARIANT_1_MS_MILESTONE_2_param} : "value" -} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0207.jsonp b/test/testfiles/jpp-test_config_0207.jsonp deleted file mode 100644 index 35241d8c..00000000 --- a/test/testfiles/jpp-test_config_0207.jsonp +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2020-2024 Robert Bosch GmbH -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -//************************************************************************** -{ - // taking over the already defined basic data types - "[import]" : "./jpp-test_config_testdata_1.jsonp", - // Updated key name due to enhancement 270 - Dynamic key names shall be blocked - // "VAR_${dict_variants.${variant_key_${variant_number}}}_MS_${dict_milestones.${milestone_key_${milestone_number}}}_param" : "value" - ${VAR_VARIANT_1_MS_MILESTONE_2_param} : "value" -} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0208.jsonp b/test/testfiles/jpp-test_config_0208.jsonp deleted file mode 100644 index fad626a3..00000000 --- a/test/testfiles/jpp-test_config_0208.jsonp +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2020-2024 Robert Bosch GmbH -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -//************************************************************************** -{ - // taking over the already defined basic data types - "[import]" : "./jpp-test_config_testdata_1.jsonp", - // - "param" : "VAR_${dict_variants}['${variant_key_${variant_number}}']_MS_${dict_milestones}['${milestone_key_${milestone_number}}'] value" -} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0209.jsonp b/test/testfiles/jpp-test_config_0209.jsonp deleted file mode 100644 index a3a4517e..00000000 --- a/test/testfiles/jpp-test_config_0209.jsonp +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2020-2024 Robert Bosch GmbH -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -//************************************************************************** -{ - // taking over the already defined basic data types - "[import]" : "./jpp-test_config_testdata_1.jsonp", - // - "param" : "VAR_${dict_variants.${variant_key_${variant_number}}}_MS_${dict_milestones.${milestone_key_${milestone_number}}} value" -} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0251.jsonp b/test/testfiles/jpp-test_config_0251.jsonp index 8dc0978b..3f119409 100644 --- a/test/testfiles/jpp-test_config_0251.jsonp +++ b/test/testfiles/jpp-test_config_0251.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "${m${IAMNOTEXISTING}ne}_${milestone_number}" : "MILESTONE_2 (new value)" + "param" : "VAR_${variant_${list_variant_numbers}[${IAMNOTEXISTING}]}_MS_${milestone_${list_milestone_numbers}[${list_milestone_index}]} value" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0252.jsonp b/test/testfiles/jpp-test_config_0252.jsonp index 326d2dd5..76e9a991 100644 --- a/test/testfiles/jpp-test_config_0252.jsonp +++ b/test/testfiles/jpp-test_config_0252.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "VAR_${variant_${list_variant_numbers}[${IAMNOTEXISTING}]}_MS_${milestone_${list_milestone_numbers}[${list_milestone_index}]}_param" : "value" + "param" : "VAR_${variant_${list_variant_numbers.${list_variant_index}}}_MS_${milestone_${list_milestone_numbers.${IAMNOTEXISTING}}} value" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0253.jsonp b/test/testfiles/jpp-test_config_0253.jsonp index e89db170..2f4576dd 100644 --- a/test/testfiles/jpp-test_config_0253.jsonp +++ b/test/testfiles/jpp-test_config_0253.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "VAR_${variant_${list_variant_numbers.${list_variant_index}}}_MS_${milestone_${list_milestone_numbers.${IAMNOTEXISTING}}}_param" : "value" + "param" : "VAR_${dict_variants}['${variant_key_${IAMNOTEXISTING}}']_MS_${dict_milestones}['${milestone_key_${milestone_number}}'] value" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0254.jsonp b/test/testfiles/jpp-test_config_0254.jsonp index 3f119409..3c45a763 100644 --- a/test/testfiles/jpp-test_config_0254.jsonp +++ b/test/testfiles/jpp-test_config_0254.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "param" : "VAR_${variant_${list_variant_numbers}[${IAMNOTEXISTING}]}_MS_${milestone_${list_milestone_numbers}[${list_milestone_index}]} value" + "param" : "VAR_${dict_variants.${variant_key_${variant_number}}}_MS-${dict_milestones.${milestone_key_${IAMNOTEXISTING}}} value" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0255.jsonp b/test/testfiles/jpp-test_config_0255.jsonp index 76e9a991..9c6b72b0 100644 --- a/test/testfiles/jpp-test_config_0255.jsonp +++ b/test/testfiles/jpp-test_config_0255.jsonp @@ -13,8 +13,6 @@ // limitations under the License. //************************************************************************** { - // taking over the already defined basic data types - "[import]" : "./jpp-test_config_testdata_1.jsonp", - // - "param" : "VAR_${variant_${list_variant_numbers.${list_variant_index}}}_MS_${milestone_${list_milestone_numbers.${IAMNOTEXISTING}}} value" + "testlist" : [1,2,3], + "param" : "${testlist}" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0256.jsonp b/test/testfiles/jpp-test_config_0256.jsonp index 092f4c25..38108fa0 100644 --- a/test/testfiles/jpp-test_config_0256.jsonp +++ b/test/testfiles/jpp-test_config_0256.jsonp @@ -13,8 +13,6 @@ // limitations under the License. //************************************************************************** { - // taking over the already defined basic data types - "[import]" : "./jpp-test_config_testdata_1.jsonp", - // - "VAR_${dict_variants}['${variant_key_${IAMNOTEXISTING}}']_MS_${dict_milestones}['${milestone_key_${milestone_number}}']_param" : "value" + "testlist" : [1,2,3], + "param" : "A_${testlist}_B" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0257.jsonp b/test/testfiles/jpp-test_config_0257.jsonp index 3bad97b6..b165a937 100644 --- a/test/testfiles/jpp-test_config_0257.jsonp +++ b/test/testfiles/jpp-test_config_0257.jsonp @@ -13,8 +13,6 @@ // limitations under the License. //************************************************************************** { - // taking over the already defined basic data types - "[import]" : "./jpp-test_config_testdata_1.jsonp", - // - "VAR_${dict_variants.${variant_key_${variant_number}}}_MS_${dict_milestones.${milestone_key_${IAMNOTEXISTING}}}_param" : "value" + "testdict" : {"A" : 1, "B" : 2}, + "param" : "${testdict}" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0258.jsonp b/test/testfiles/jpp-test_config_0258.jsonp index 2f4576dd..d2d7bd26 100644 --- a/test/testfiles/jpp-test_config_0258.jsonp +++ b/test/testfiles/jpp-test_config_0258.jsonp @@ -13,8 +13,6 @@ // limitations under the License. //************************************************************************** { - // taking over the already defined basic data types - "[import]" : "./jpp-test_config_testdata_1.jsonp", - // - "param" : "VAR_${dict_variants}['${variant_key_${IAMNOTEXISTING}}']_MS_${dict_milestones}['${milestone_key_${milestone_number}}'] value" + "testdict" : {"A" : 1, "B" : 2}, + "param" : "A_${testdict}_B" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0259.jsonp b/test/testfiles/jpp-test_config_0259.jsonp index 3c45a763..68ad6cdc 100644 --- a/test/testfiles/jpp-test_config_0259.jsonp +++ b/test/testfiles/jpp-test_config_0259.jsonp @@ -13,8 +13,7 @@ // limitations under the License. //************************************************************************** { - // taking over the already defined basic data types - "[import]" : "./jpp-test_config_testdata_1.jsonp", - // - "param" : "VAR_${dict_variants.${variant_key_${variant_number}}}_MS-${dict_milestones.${milestone_key_${IAMNOTEXISTING}}} value" + "testlist" : [1,2,3], + "testdict" : {"A" : 1, "B" : 2}, + "param" : "A_${testlist}_${testdict}_B" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0260.jsonp b/test/testfiles/jpp-test_config_0260.jsonp index e1df216e..f0247392 100644 --- a/test/testfiles/jpp-test_config_0260.jsonp +++ b/test/testfiles/jpp-test_config_0260.jsonp @@ -13,6 +13,6 @@ // limitations under the License. //************************************************************************** { - "param" : [1,2,3], - "${param}" : "value" + "testdict" : {"A" : 1, "B" : 2}, + "param" : [1,"${testdict}",3] } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0261.jsonp b/test/testfiles/jpp-test_config_0261.jsonp index 14193100..00838b71 100644 --- a/test/testfiles/jpp-test_config_0261.jsonp +++ b/test/testfiles/jpp-test_config_0261.jsonp @@ -13,7 +13,6 @@ // limitations under the License. //************************************************************************** { - "param1" : "prefix", - "param2" : [1,2,3], - "${param1}_${param2}_suffix" : "value" + "testlist" : [1,2,3], + "param" : {"A" : 1, "B" : "${testlist}"} } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0262.jsonp b/test/testfiles/jpp-test_config_0262.jsonp index fc66d21b..e07690d1 100644 --- a/test/testfiles/jpp-test_config_0262.jsonp +++ b/test/testfiles/jpp-test_config_0262.jsonp @@ -13,6 +13,6 @@ // limitations under the License. //************************************************************************** { - "param" : {"A" : 1, "B" : 2}, - "${param}" : "value" + "testlist" : [1,2,3], + "param" : {"A" : [{"A" : 1, "B" : 2}, {"C" : 3, "D" : [1,2,"${testlist}",3]}], "E" : 5} } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0263.jsonp b/test/testfiles/jpp-test_config_0263.jsonp index 9c4e52c1..c5baba26 100644 --- a/test/testfiles/jpp-test_config_0263.jsonp +++ b/test/testfiles/jpp-test_config_0263.jsonp @@ -13,7 +13,6 @@ // limitations under the License. //************************************************************************** { - "param1" : "prefix", - "param2" : {"A" : 1, "B" : 2}, - "${param1}_${param2}_suffix" : "value" + "testdict" : {"A" : 1, "B" : 2}, + "param" : {"A" : [{"A" : 1, "B" : 2}, {"C" : 3, "D" : [1,2,"${testdict}",3]}], "E" : 5} } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0264.jsonp b/test/testfiles/jpp-test_config_0264.jsonp index 54c2fd73..57ec108b 100644 --- a/test/testfiles/jpp-test_config_0264.jsonp +++ b/test/testfiles/jpp-test_config_0264.jsonp @@ -13,6 +13,6 @@ // limitations under the License. //************************************************************************** { - "param1" : [1,2,3], - "param2" : {"${param1}" : "value"} -} \ No newline at end of file + "param1" : "A", + "${param1}" : "B" +} diff --git a/test/testfiles/jpp-test_config_0265.jsonp b/test/testfiles/jpp-test_config_0265.jsonp index edb0591a..efe4e797 100644 --- a/test/testfiles/jpp-test_config_0265.jsonp +++ b/test/testfiles/jpp-test_config_0265.jsonp @@ -13,7 +13,6 @@ // limitations under the License. //************************************************************************** { - "param1" : "prefix", - "param2" : [1,2,3], - "param3" : {"${param1}_${param2}_suffix" : "value"} -} \ No newline at end of file + "param1" : "A", + "A.${param1}.B" : "B" +} diff --git a/test/testfiles/jpp-test_config_0266.jsonp b/test/testfiles/jpp-test_config_0266.jsonp index 19760b6a..c355976a 100644 --- a/test/testfiles/jpp-test_config_0266.jsonp +++ b/test/testfiles/jpp-test_config_0266.jsonp @@ -13,6 +13,6 @@ // limitations under the License. //************************************************************************** { - "param1" : {"A" : 1, "B" : 2}, - "param2" : {"${param1}" : "value"} + "testlist" : [1,2,3], + "${testlist}" : "B" } diff --git a/test/testfiles/jpp-test_config_0267.jsonp b/test/testfiles/jpp-test_config_0267.jsonp index cfbb7ab2..1aed227c 100644 --- a/test/testfiles/jpp-test_config_0267.jsonp +++ b/test/testfiles/jpp-test_config_0267.jsonp @@ -13,7 +13,6 @@ // limitations under the License. //************************************************************************** { - "param1" : "prefix", - "param2" : {"A" : 1, "B" : 2}, - "param3" : {"${param1}_${param2}_suffix" : "value"} -} \ No newline at end of file + "testdict" : {"A" : 1, "B" : 2}, + "A.${testdict}.B" : "B" +} diff --git a/test/testfiles/jpp-test_config_0268.jsonp b/test/testfiles/jpp-test_config_0268.jsonp index 491efaee..4d53e2ff 100644 --- a/test/testfiles/jpp-test_config_0268.jsonp +++ b/test/testfiles/jpp-test_config_0268.jsonp @@ -13,6 +13,6 @@ // limitations under the License. //************************************************************************** { - "dictParam" : {"A" : 0, "B" : 1}, - "param" : "${dictParam}" -} \ No newline at end of file + "param1" : "A", + "param1" : {"A" : 1, "${param1}" : 2} +} diff --git a/test/testfiles/jpp-test_config_0269.jsonp b/test/testfiles/jpp-test_config_0269.jsonp index 66b8f2bc..d3ae4e97 100644 --- a/test/testfiles/jpp-test_config_0269.jsonp +++ b/test/testfiles/jpp-test_config_0269.jsonp @@ -13,6 +13,6 @@ // limitations under the License. //************************************************************************** { - "listParam" : ["A", "B"], - "param" : "${listParam}" -} \ No newline at end of file + "param1" : "A", + "param1" : {"A" : 1, "A.${param1}.B" : 2} +} diff --git a/test/testfiles/jpp-test_config_0270.jsonp b/test/testfiles/jpp-test_config_0270.jsonp index 25d3ec64..aee13e6f 100644 --- a/test/testfiles/jpp-test_config_0270.jsonp +++ b/test/testfiles/jpp-test_config_0270.jsonp @@ -13,7 +13,6 @@ // limitations under the License. //************************************************************************** { - "intval" : 1, - "listval" : ["B", 2], - "param_${listval}['${intval}']}" : 3 -} \ No newline at end of file + "testlist" : [1,2,3], + "param1" : {"A" : 1, "${testlist}" : 2} +} diff --git a/test/testfiles/jpp-test_config_0453.jsonp b/test/testfiles/jpp-test_config_0271.jsonp similarity index 88% rename from test/testfiles/jpp-test_config_0453.jsonp rename to test/testfiles/jpp-test_config_0271.jsonp index dda2b780..fe7da8ed 100644 --- a/test/testfiles/jpp-test_config_0453.jsonp +++ b/test/testfiles/jpp-test_config_0271.jsonp @@ -13,5 +13,6 @@ // limitations under the License. //************************************************************************** { - "param\\1" : "value" + "testdict" : {"A" : 1, "B" : 2}, + "param1" : {"A" : 1, "A.${testdict}.B" : 2} } diff --git a/test/testfiles/jpp-test_config_0272.jsonp b/test/testfiles/jpp-test_config_0272.jsonp new file mode 100644 index 00000000..67a9146a --- /dev/null +++ b/test/testfiles/jpp-test_config_0272.jsonp @@ -0,0 +1,19 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "param" : "X", + "testdict" : {"A" : 1, "B" : 2}, + ${testdict}['${param}'] : 3 +} diff --git a/test/testfiles/jpp-test_config_0452.jsonp b/test/testfiles/jpp-test_config_0273.jsonp similarity index 88% rename from test/testfiles/jpp-test_config_0452.jsonp rename to test/testfiles/jpp-test_config_0273.jsonp index 26f8ccac..332a2a5f 100644 --- a/test/testfiles/jpp-test_config_0452.jsonp +++ b/test/testfiles/jpp-test_config_0273.jsonp @@ -13,5 +13,7 @@ // limitations under the License. //************************************************************************** { - "param/1" : "value" + "param" : "X", + "testdict" : {"A" : 1, "B" : 2}, + ${testdict}[${param}] : 3 } diff --git a/test/testfiles/jpp-test_config_0450.jsonp b/test/testfiles/jpp-test_config_0274.jsonp similarity index 88% rename from test/testfiles/jpp-test_config_0450.jsonp rename to test/testfiles/jpp-test_config_0274.jsonp index 73596034..e283802b 100644 --- a/test/testfiles/jpp-test_config_0450.jsonp +++ b/test/testfiles/jpp-test_config_0274.jsonp @@ -13,5 +13,7 @@ // limitations under the License. //************************************************************************** { - "$/{/}/[/]/&/#/,/;/:" : "string" + "param" : "X", + "testdict" : {"A" : 1, "B" : 2}, + ${testdict.${param}} : 3 } diff --git a/test/testfiles/jpp-test_config_0400.jsonp b/test/testfiles/jpp-test_config_0400.jsonp new file mode 100644 index 00000000..4b4d79ef --- /dev/null +++ b/test/testfiles/jpp-test_config_0400.jsonp @@ -0,0 +1,90 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "A" : 1, + "check01" : ${A}, + // Bug: https://github.com/test-fullautomation/python-jsonpreprocessor/issues/357#issuecomment-2435677836 + // 'The parameter '${0}' is not available!'! + // "0" : 2, + // "check02" : ${0}, + "_" : 3, + "check03" : ${_}, + // + "Ax" : 4, + "check04" : ${Ax}, + "0x" : 5, + "check05" : ${0x}, + "_x" : 6, + "check06" : ${_x}, + // + "param+1" : 7, + "check07" : ${param+1}, + "param-2" : 8, + "check08" : ${param-2}, + "param*3" : 9, + "check09" : ${param*3}, + "param/4" : 10, + // bug: https://github.com/test-fullautomation/python-jsonpreprocessor/issues/356#issuecomment-2435708593 + // Expecting ',' delimiter + // "check10" : ${param/4}, + // + "p01" : {"A" : 7}, + "check11" : ${p01}['A'], + "p02" : {"0" : 8}, + "check12" : ${p02}['0'], + "p03" : {"_" : 9}, + "check13" : ${p03}['_'], + // + "p04" : {"Ax" : 10}, + "check14" : ${p04}['Ax'], + "p05" : {"0x" : 11}, + "check15" : ${p05}['0x'], + "p06" : {"_x" : 12}, + "check16" : ${p06}['_x'], + // + "p07" : {"param+1" : 13}, + "check17" : ${p07}['param+1'], + "p08" : {"param-2" : 14}, + "check18" : ${p08}['param-2'], + "p09" : {"param*3" : 15}, + "check19" : ${p09}['param*3'], + "p10" : {"param/4" : 16}, + // Expecting ',' delimiter + // "check20" : ${p10}['param/4'], + // + "p11" : [1, {"A" : 17}, 2], + "check21" : ${p11}[1]['A'], + "p12" : [1, {"0" : 18}, 2], + "check22" : ${p12}[1]['0'], + "p13" : [1, {"_" : 19}, 2], + "check23" : ${p13}[1]['_'], + // + "p14" : [1, {"Ax" : 20}, 2], + "check24" : ${p14}[1]['Ax'], + "p15" : [1, {"0x" : 21}, 2], + "check25" : ${p15}[1]['0x'], + "p16" : [1, {"_x" : 22}, 2], + "check26" : ${p16}[1]['_x'], + // // + "p17" : [1, {"param+1" : 23}, 2], + "check27" : ${p17}[1]['param+1'], + "p18" : [1, {"param-2" : 24}, 2], + "check28" : ${p18}[1]['param-2'], + "p19" : [1, {"param*3" : 25}, 2], + "check29" : ${p19}[1]['param*3'], + "p20" : [1, {"param/4" : 26}, 2] + // Expecting ',' delimiter + // "check30" : ${p20}[1]['param/4'] +} diff --git a/test/testfiles/jpp-test_config_0454.jsonp b/test/testfiles/jpp-test_config_0454.jsonp deleted file mode 100644 index 38d73220..00000000 --- a/test/testfiles/jpp-test_config_0454.jsonp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2020-2024 Robert Bosch GmbH -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -//************************************************************************** -{ - "param\\\\1" : "value" -} diff --git a/test/testfiles/jpp-test_config_0455.jsonp b/test/testfiles/jpp-test_config_0455.jsonp deleted file mode 100644 index 7ddc56ef..00000000 --- a/test/testfiles/jpp-test_config_0455.jsonp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2020-2024 Robert Bosch GmbH -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -//************************************************************************** -{ - "dictParam" : {"key-A" : 1, "keyB" : 2} -} diff --git a/test/testfiles/jpp-test_config_0456.jsonp b/test/testfiles/jpp-test_config_0456.jsonp deleted file mode 100644 index 44df76dc..00000000 --- a/test/testfiles/jpp-test_config_0456.jsonp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2020-2024 Robert Bosch GmbH -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -//************************************************************************** -{ - "dictParam" : {"key/A" : 1, "keyB" : 2} -} diff --git a/test/testfiles/jpp-test_config_0457.jsonp b/test/testfiles/jpp-test_config_0457.jsonp deleted file mode 100644 index 390e9b1f..00000000 --- a/test/testfiles/jpp-test_config_0457.jsonp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2020-2024 Robert Bosch GmbH -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -//************************************************************************** -{ - "dictParam" : {"key\\A" : 1, "keyB" : 2} -} diff --git a/test/testfiles/jpp-test_config_0458.jsonp b/test/testfiles/jpp-test_config_0458.jsonp deleted file mode 100644 index d59aa543..00000000 --- a/test/testfiles/jpp-test_config_0458.jsonp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2020-2024 Robert Bosch GmbH -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -//************************************************************************** -{ - "dictParam" : {"key\\\\A" : 1, "keyB" : 2} -} diff --git a/test/testfiles/jpp-test_config_0506.jsonp b/test/testfiles/jpp-test_config_0506.jsonp index b47e536e..d2586c8f 100644 --- a/test/testfiles/jpp-test_config_0506.jsonp +++ b/test/testfiles/jpp-test_config_0506.jsonp @@ -13,8 +13,8 @@ // limitations under the License. //************************************************************************** { - "param1" : "{\"A\" : 1, \"B\" : 2}", // updated based on enhancement 249 - Parameter substitution needs to be limited - "param2" : "[1,2,3]", // updated based on enhancement 249 - Parameter substitution needs to be limited + "param1" : "{\"A\" : 1, \"B\" : 2}", + "param2" : "[1,2,3]", "param3" : "value", // "var1" : "value 1 > ${param1}", diff --git a/test/testfiles/jpp-test_config_0513.jsonp b/test/testfiles/jpp-test_config_0513.jsonp index 7dceca93..68784302 100644 --- a/test/testfiles/jpp-test_config_0513.jsonp +++ b/test/testfiles/jpp-test_config_0513.jsonp @@ -39,19 +39,6 @@ ${dictparam}['${intparam}'] : 3, ${dictparam}[${stringparam}] : 4, ${dictparam}['${stringparam}'] : 5, - ${dictparam}['B'] : 6, - // Updated key name due to enhancement 270 - Dynamic key names shall be blocked - // "${listparam}[${intparam}]" : "E", - // "${listparam}[1]" : "F", - // "${dictparam}['${intparam}']" : 3, - // "${dictparam}[${stringparam}]" : 4, - // "${dictparam}['${stringparam}']" : 5, - // "${dictparam}['B']" : 6 - "C" : "E", - "D" : "F", - "3" : 3, - "5" : 4, - "5" : 5, - "6" : 6 + ${dictparam}['B'] : 6 } diff --git a/test/testfiles/jpp-test_config_1004.jsonp b/test/testfiles/jpp-test_config_1004.jsonp index 78b2fbff..de95407f 100644 --- a/test/testfiles/jpp-test_config_1004.jsonp +++ b/test/testfiles/jpp-test_config_1004.jsonp @@ -15,20 +15,18 @@ { // implicit creation in ascending dotdict syntax: - ${testdict1} : {"subKey1" : {"subKey2" : {"subKey3" : {"subKey4" : 0}}}}, ${testdict1.subKey1} : {"subKey2" : {"subKey3" : {"subKey4" : 1}}}, ${testdict1.subKey1.subKey2} : {"subKey3" : {"subKey4" : 2}}, ${testdict1.subKey1.subKey2.subKey3} : {"subKey4" : 3}, ${testdict1.subKey1.subKey2.subKey3.subKey4} : 4, // - // values overwritten in descending dotdict syntax: + // implicit creation in descending dotdict syntax: ${testdict2.subKey1.subKey2.subKey3.subKey4} : 5, ${testdict2.subKey1.subKey2.subKey3} : {"subKey4" : 6}, ${testdict2.subKey1.subKey2} : {"subKey3" : {"subKey4" : 7}}, ${testdict2.subKey1} : {"subKey2" : {"subKey3" : {"subKey4" : 8}}}, - ${testdict2} : {"subKey1" : {"subKey2" : {"subKey3" : {"subKey4" : 9}}}}, // // cross check: - ${testdict3} : {"subKey1" : {"subKey2" : {"subKey3" : {"subKey4" : 10}}}}, - "testdict4" : {"subKey1" : {"subKey2" : {"subKey3" : {"subKey4" : 20}}}} + "testdict3" : {"subKey1" : {"subKey2" : {"subKey3" : {"subKey4" : 30}}}}, + "testdict4" : {"subKey1" : {"subKey2" : {"subKey3" : {"subKey4" : 40}}}} } diff --git a/test/testfiles/jpp-test_config_2000.jsonp b/test/testfiles/jpp-test_config_2000.jsonp new file mode 100644 index 00000000..120cf70d --- /dev/null +++ b/test/testfiles/jpp-test_config_2000.jsonp @@ -0,0 +1,22 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "param" : 1, + "params" : {"001" : { + "param" : 2, + ${params}['001']['param'] : 3 + } + } +} diff --git a/test/testfiles/jpp-test_config_2001.jsonp b/test/testfiles/jpp-test_config_2001.jsonp new file mode 100644 index 00000000..cd0738d7 --- /dev/null +++ b/test/testfiles/jpp-test_config_2001.jsonp @@ -0,0 +1,22 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "param" : 1, + "params" : {"001" : { + "param" : 2, + ${params.001.param} : 3 + } + } +} diff --git a/test/testfiles/jpp-test_config_2002.jsonp b/test/testfiles/jpp-test_config_2002.jsonp new file mode 100644 index 00000000..dd943505 --- /dev/null +++ b/test/testfiles/jpp-test_config_2002.jsonp @@ -0,0 +1,22 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "param" : 1, + "params" : {"001" : { + "param" : 2 + } + }, + ${params}['001']['param'] : 3 +} diff --git a/test/testfiles/jpp-test_config_2003.jsonp b/test/testfiles/jpp-test_config_2003.jsonp new file mode 100644 index 00000000..c91baf98 --- /dev/null +++ b/test/testfiles/jpp-test_config_2003.jsonp @@ -0,0 +1,22 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "param" : 1, + "params" : {"001" : { + "param" : 2 + } + }, + ${params.001.param} : 3 +} diff --git a/test/testfiles/jpp-test_config_2004.jsonp b/test/testfiles/jpp-test_config_2004.jsonp new file mode 100644 index 00000000..2f271da2 --- /dev/null +++ b/test/testfiles/jpp-test_config_2004.jsonp @@ -0,0 +1,32 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + // https://github.com/test-fullautomation/python-jsonpreprocessor/issues/349 + "C" : 1, + "params" : [ + 2, + {"A" : 3, + "B" : [ + { + "C" : 4, + ${params}[1]['B'][0]['C'] : 10, + "D" : 5 + }, + 6 + ] + }, + 7 + ] +} diff --git a/test/testfiles/jpp-test_config_2005.jsonp b/test/testfiles/jpp-test_config_2005.jsonp new file mode 100644 index 00000000..14bcbe6e --- /dev/null +++ b/test/testfiles/jpp-test_config_2005.jsonp @@ -0,0 +1,34 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + // https://github.com/test-fullautomation/python-jsonpreprocessor/issues/349 + // 'A key with name '${params.1.B.0.C}' does not exist at this position. Use the ' : ' syntax to create a new key.'! + + "C" : 1, + "params" : [ + 2, + {"A" : 3, + "B" : [ + { + "C" : 4, + ${params.1.B.0.C} : 10, + "D" : 5 + }, + 6 + ] + }, + 7 + ] +} diff --git a/test/testfiles/jpp-test_config_2006.jsonp b/test/testfiles/jpp-test_config_2006.jsonp new file mode 100644 index 00000000..fb04f305 --- /dev/null +++ b/test/testfiles/jpp-test_config_2006.jsonp @@ -0,0 +1,34 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + // https://github.com/test-fullautomation/python-jsonpreprocessor/issues/349 + // {C} [INT] : 10 + + "C" : 1, + "params" : [ + 2, + {"A" : 3, + "B" : [ + { + "C" : 4, + "D" : 5 + }, + 6 + ] + }, + 7 + ], + ${params}[1]['B'][0]['C'] : 10 +} diff --git a/test/testfiles/jpp-test_config_2007.jsonp b/test/testfiles/jpp-test_config_2007.jsonp new file mode 100644 index 00000000..16524b04 --- /dev/null +++ b/test/testfiles/jpp-test_config_2007.jsonp @@ -0,0 +1,31 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "C" : 1, + "params" : [ + 2, + {"A" : 3, + "B" : [ + { + "C" : 4, + "D" : 5 + }, + 6 + ] + }, + 7 + ], + ${params.1.B.0.C} : 10 +} diff --git a/test/testfiles/jpp-test_config_0451.jsonp b/test/testfiles/jpp-test_config_2500.jsonp similarity index 96% rename from test/testfiles/jpp-test_config_0451.jsonp rename to test/testfiles/jpp-test_config_2500.jsonp index a07bd570..5239d4b3 100644 --- a/test/testfiles/jpp-test_config_0451.jsonp +++ b/test/testfiles/jpp-test_config_2500.jsonp @@ -13,5 +13,5 @@ // limitations under the License. //************************************************************************** { - "param-1" : "value" + ${param} : 1 } diff --git a/test/testfiles/jpp-test_config_2501.jsonp b/test/testfiles/jpp-test_config_2501.jsonp new file mode 100644 index 00000000..b805dbea --- /dev/null +++ b/test/testfiles/jpp-test_config_2501.jsonp @@ -0,0 +1,21 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "param" : 1, + "params" : {"001" : { + ${param} : 2 + } + } +} diff --git a/test/testfiles/jpp-test_config_2502.jsonp b/test/testfiles/jpp-test_config_2502.jsonp new file mode 100644 index 00000000..d4ca2f62 --- /dev/null +++ b/test/testfiles/jpp-test_config_2502.jsonp @@ -0,0 +1,22 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "param" : 1, + "params" : {"001" : { + "param" : 2, + ${param} : 3 + } + } +} diff --git a/test/testfiles/jpp-test_config_2503.jsonp b/test/testfiles/jpp-test_config_2503.jsonp new file mode 100644 index 00000000..e15e5060 --- /dev/null +++ b/test/testfiles/jpp-test_config_2503.jsonp @@ -0,0 +1,20 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "params" : {"001" : { + ${params}['001'] : 1 + } + } +} diff --git a/test/testfiles/jpp-test_config_2504.jsonp b/test/testfiles/jpp-test_config_2504.jsonp new file mode 100644 index 00000000..c024fd84 --- /dev/null +++ b/test/testfiles/jpp-test_config_2504.jsonp @@ -0,0 +1,20 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "params" : {"001" : { + ${params.001} : 1 + } + } +} diff --git a/test/testfiles/jpp-test_config_2505.jsonp b/test/testfiles/jpp-test_config_2505.jsonp new file mode 100644 index 00000000..7dff9ae9 --- /dev/null +++ b/test/testfiles/jpp-test_config_2505.jsonp @@ -0,0 +1,33 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + // https://github.com/test-fullautomation/python-jsonpreprocessor/issues/349 + // invalid output + "C" : 1, + "params" : [ + 2, + {"A" : 3, + "B" : [ + { + "C" : 4, + ${C} : 10, + "D" : 5 + }, + 6 + ] + }, + 7 + ] +} diff --git a/test/testfiles/jpp-test_config_2506.jsonp b/test/testfiles/jpp-test_config_2506.jsonp new file mode 100644 index 00000000..4a735897 --- /dev/null +++ b/test/testfiles/jpp-test_config_2506.jsonp @@ -0,0 +1,30 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "C" : 1, + "params" : [ + 2, + {"A" : 3, + "B" : [ + { + ${C} : 10, + "D" : 5 + }, + 6 + ] + }, + 7 + ] +} diff --git a/test/testfiles/jpp-test_config_2507.jsonp b/test/testfiles/jpp-test_config_2507.jsonp new file mode 100644 index 00000000..2a93db56 --- /dev/null +++ b/test/testfiles/jpp-test_config_2507.jsonp @@ -0,0 +1,30 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "C" : 1, + "params" : [ + 2, + {"A" : 3, + "B" : [ + { + ${params}[1]['B'][0]['C'] : 10, + "D" : 5 + }, + 6 + ] + }, + 7 + ] +} diff --git a/test/testfiles/jpp-test_config_2508.jsonp b/test/testfiles/jpp-test_config_2508.jsonp new file mode 100644 index 00000000..a554d2a4 --- /dev/null +++ b/test/testfiles/jpp-test_config_2508.jsonp @@ -0,0 +1,30 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "C" : 1, + "params" : [ + 2, + {"A" : 3, + "B" : [ + { + ${params.1.B.0.C} : 10, + "D" : 5 + }, + 6 + ] + }, + 7 + ] +}