| ///////////////////////////////////////////////////////////////////////////////
|
| // //
|
| // Copyright (c) 2000-2018 Ericsson Telecom AB // |
| // // |
| // All rights reserved. This program and the accompanying materials // |
| // are made available under the terms of the Eclipse Public License v2.0 // |
| // which accompanies this distribution, and is available at // |
| // https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html //
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| ///////////////////////////////////////////////////////////
|
| // Module: EPTF_DataSource_Test_Functions
|
| //
|
| // Purpose:
|
| // This module provides functions for testing GUIDataSource
|
| //
|
| // Module depends on:
|
| // -
|
| //
|
| // Current Owner:
|
| // TitanSim Group
|
| //
|
| // Last Review Date:
|
| // -
|
| //
|
| // Detailed Comments:
|
| // Provide functions to test GUIDataSource
|
| //
|
| //
|
| ///////////////////////////////////////////////////////////////
|
| module EPTF_DataSource_Test_Functions
|
| {
|
|
|
| import from EPTF_CLL_Common_Definitions all;
|
| import from EPTF_CLL_Base_Functions all;
|
| import from EPTF_CLL_Variable_Definitions all;
|
| import from EPTF_CLL_Variable_Functions all;
|
| import from EPTF_DataSource_Test_Definitions all;
|
| import from EPTF_CLL_UIHandler_WidgetFunctions all;
|
| import from EPTF_CLL_UIHandler_Definitions all;
|
| import from EPTF_CLL_DataSource_Definitions all;
|
| import from EPTF_CLL_DataSource_Functions all;
|
| import from EPTF_CLL_DataSourceClient_Functions all;
|
| import from EPTF_CLL_Logging_Functions all;
|
| import from EPTF_CLL_DataSource_Definitions all;
|
|
|
| group EPTF_DataSource_TestFunctions {
|
|
|
| ///////////////////////////////////////////////////////////
|
| // Testcase: f_EPTF_GUIDataSource_Test_ServerBehavior
|
| //
|
| // Purpose:
|
| //
|
| // Parameters:
|
| //
|
| ///////////////////////////////////////////////////////////
|
| public function f_EPTF_CLL_DataSource_Test_serverBehavior()
|
| runs on EPTF_DataSource_CT
|
| {
|
| f_EPTF_DataSource_init_CT("GUIDataSourceServer");
|
|
|
| timer t;
|
| t.start(26.0);
|
| alt {
|
| [] t.timeout {}
|
| }
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| //f_EPTF_Base_cleanup_CT();
|
| }
|
|
|
| ///////////////////////////////////////////////////////////
|
| // Testcase: f_EPTF_GUIDataSource_Test_ClientBehavior
|
| //
|
| // Purpose:
|
| //
|
| // Parameters:
|
| //
|
| ///////////////////////////////////////////////////////////
|
| public function f_EPTF_CLL_DataSource_Test_clientBehavior( in charstring pl_dataProviderName,
|
| in EPTF_DataSource_CT pl_server,
|
| in charstring pl_selfName := "GUIDataSource Client")
|
| runs on EPTF_CLL_DataSource_Client_CT
|
| {
|
| f_EPTF_Var_init_CT(pl_selfName);
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName, pl_server);
|
| //f_EPTF_DataSourceClient_registerIterator(pl_dataProviderName, "", refers(f_EPTF_CLL_DataSource_preProcessor));
|
| f_EPTF_DataSourceClient_registerData(pl_dataProviderName, "", refers(f_EPTF_CLL_DataSource_preProcessorData));
|
| var integer vl_idx;
|
|
|
| var EPTF_CharstringList vl_cList := {};
|
| f_EPTF_Var_newCharstring(c_EPTF_CLL_DataSource_Test_var_prefix & "ch1","Initvalue for charstring variable",vl_idx);
|
| vl_cList[sizeof(vl_cList)] := "ch1";
|
| f_EPTF_Var_newCharstring(c_EPTF_CLL_DataSource_Test_var_prefix & "ch2","Initvalue for charstring variable second",vl_idx);
|
| vl_cList[sizeof(vl_cList)] := "ch2";
|
|
|
| f_EPTF_Var_newFloat(c_EPTF_CLL_DataSource_Test_var_prefix & "fl1",3.14,vl_idx);
|
| vl_cList[sizeof(vl_cList)] := "fl1";
|
| f_EPTF_Var_newBool(c_EPTF_CLL_DataSource_Test_var_prefix & "bool1",true,vl_idx);
|
| vl_cList[sizeof(vl_cList)] := "bool1";
|
| f_EPTF_Var_newInt(c_EPTF_CLL_DataSource_Test_var_prefix & "int1",7890,vl_idx);
|
| vl_cList[sizeof(vl_cList)] := "int1";
|
|
|
| f_EPTF_Var_newCharstringlistRef(c_EPTF_CLL_DataSource_Test_var_prefix & "allVar", vl_cList ,vl_idx);
|
|
|
| vl_cList := {"LGen1", "LGen2", "LGen3"}
|
| f_EPTF_Var_newCharstringlistRef(c_EPTF_CLL_DataSource_Test_var_prefix & "LGens", vl_cList ,vl_idx);
|
|
|
| vl_cList := {"Scens1", "Scens2", "Scens3"}
|
| f_EPTF_Var_newCharstringlistRef(c_EPTF_CLL_DataSource_Test_var_prefix & "Scens", vl_cList ,vl_idx);
|
|
|
| vl_cList := {"TC1", "TC2", "TC3"}
|
| f_EPTF_Var_newCharstringlistRef(c_EPTF_CLL_DataSource_Test_var_prefix & "TCs", vl_cList ,vl_idx);
|
|
|
|
|
| f_EPTF_DataSourceClient_registerData("LGenBase", "LGen1", refers(f_EPTF_CLL_DataSource_preProcessorData));
|
| f_EPTF_DataSourceClient_registerData("LGenBase", "LGen2", refers(f_EPTF_CLL_DataSource_preProcessorData));
|
| f_EPTF_DataSourceClient_registerData("LGenBase", "LGen3", refers(f_EPTF_CLL_DataSource_preProcessorData));
|
|
|
| timer t;
|
| t.start(26.0);
|
| alt {
|
| [] t.timeout {}
|
| }
|
|
|
| f_EPTF_Base_cleanup_CT();
|
| }
|
|
|
| public function f_EPTF_CLL_DataSource_preProcessorData( out charstring pl_dataVarName,
|
| in charstring pl_source,
|
| in charstring pl_ptcName,
|
| in charstring pl_element,
|
| in EPTF_DataSource_Params pl_params
|
|
|
| ) runs on EPTF_CLL_DataSource_Client_CT return integer{
|
|
|
| //TODO pl_dataProviderName-nak kene lennie, le ken menteni, hogy mi kik vagyunk...
|
| action(" f_EPTF_CLL_DataSource_preProcessorData ");
|
| action("1: " & pl_source & " 2: " & pl_ptcName & " 3: " & pl_element);
|
|
|
| if(pl_source != "ExecCtrl" and pl_source != "LGenBase"){
|
| setverdict(fail , "Wrong datasource: " & pl_source);
|
| return -1;
|
| }
|
|
|
| select( true ){
|
| case(pl_element == "allVar"){
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "allVar"
|
| return 0;
|
| }
|
| case(pl_element == "allVarand other"){
|
| //Iterator is valid, but result is empty
|
| pl_dataVarName := "";
|
| return 0;
|
| }
|
|
|
| case(pl_element == "LGens"){
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "allVar"
|
| return 0;
|
| }
|
| case(pl_element == "EntityGroups"){
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "allVar"
|
| return 0;
|
| }
|
| case(pl_element == "LGenList"){
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "LGens"
|
| return 0;
|
| }
|
|
|
| case(pl_element == "EntityCount"){
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "int1"
|
| return 0;
|
| }
|
| case(pl_element == "LGens"){
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "allVar"
|
| return 0;
|
| }
|
| case(pl_element == "Scenarios"){
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "Scens"
|
| return 0;
|
| }
|
| case(pl_element == "TrafficCases"){
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "TCs"
|
| return 0;
|
| }
|
| case(pl_element == "TCName"){
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "ch2"
|
| return 0;
|
| }
|
| case(pl_element == "TCEnabled"){
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "bool1"
|
| return 0;
|
| }
|
| case(pl_element == "TCStateName"){
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "ch2"
|
| return 0;
|
| }
|
|
|
| case(pl_element == "ch1"){
|
| if(pl_params[0].paramValue == "x"){
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "ch1"
|
| } else {
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "ch2"
|
| }
|
| return 0;
|
| }
|
| case(pl_element == "fl1"){
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "fl1"
|
| return 0;
|
| }
|
| case(pl_element == "bool1"){
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "bool1"
|
| return 0;
|
| }
|
| case(pl_element == "int1"){
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "int1"
|
| return 0;
|
| }
|
| case(pl_element == "bool2"){
|
| pl_dataVarName := "";
|
| return 0;
|
| }
|
| case else { //error, no rule for that
|
| pl_dataVarName := "";
|
| action("Unhandled request type in f_EPTF_UIHandler_validateElementId!");
|
| return -1;
|
| }
|
| }
|
|
|
| }
|
|
|
| group GetDataFromClient {
|
|
|
| // behaviour of main DS component
|
| function f_EPTF_CLL_DataSourceClient_Test_mainDSBehaviour(in charstring pl_selfName) runs on EPTF_DataSource_CT {
|
| f_EPTF_DataSource_init_CT(pl_selfName);
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
| const charstring c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName := "DSOwner";
|
| const charstring c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName := "DataElement";
|
| const charstring c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2 := "DataElement2";
|
| const charstring c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List := "DataElement_List";
|
| const charstring c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_ListString := "DataElement_ListString";
|
| const charstring c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_ListFloat := "DataElement_ListFloat";
|
| const charstring c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_Value := "DataElement_Value";
|
| const charstring c_EPTF_CLL_DataSourceClient_Test_DSOwnerDataVarName := "DataVarName";
|
| const charstring c_EPTF_CLL_DataSourceClient_Test_DSOwnerMethodName := "Method1";
|
| const charstring c_EPTF_CLL_DataSourceClient_Test_DSOwnerMethod2Name := "Method2";
|
| const integer c_EPTF_CLL_DataSourceClient_Test_BuiltInDataValue := 11;
|
| const EPTF_IntegerList c_EPTF_CLL_DataSourceClient_Test_DSOwnerListInit := {0,1,2,3,4,5,6,7,8,9};
|
| const EPTF_CharstringList c_EPTF_CLL_DataSourceClient_Test_DSOwnerListStringInit := {"alma", "korte", "szilva", "szolo", "dinnye"};
|
| const EPTF_FloatList c_EPTF_CLL_DataSourceClient_Test_DSOwnerListFloatInit := {0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0};
|
| const EPTF_IntegerList c_EPTF_CLL_DataSourceClient_Test_BuiltInDataValueList := {9, 8, 7, 6};
|
| const charstring c_EPTF_CLL_DataSourceClient_Test_DSOwnerValueHandlerParam := "ValueHandlerParam";
|
| const charstring c_EPTF_CLL_DataSourceClient_Test_DSOwnerValueHandlerParam2 := "ValueHandlerParam2";
|
|
|
| function f_EPTF_CLL_DataSourceClient_Test_dsOwnerBehaviour(in charstring pl_selfName, in EPTF_DataSource_CT pl_sourceCompRef, in charstring pl_errMessage := "", in charstring pl_warningMessage := "") runs on EPTF_CLL_DataSource_Client_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_sourceCompRef);
|
| var integer vl_varIdx;
|
| f_EPTF_Var_newInt(c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName&"."&c_EPTF_CLL_DataSourceClient_Test_DSOwnerDataVarName,0,vl_varIdx);
|
| f_EPTF_Var_newInt(c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2&"."&c_EPTF_CLL_DataSourceClient_Test_DSOwnerDataVarName,2,vl_varIdx);
|
| f_EPTF_Var_newIntegerlist(c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List&"."&c_EPTF_CLL_DataSourceClient_Test_DSOwnerDataVarName, c_EPTF_CLL_DataSourceClient_Test_DSOwnerListInit, vl_varIdx);
|
| f_EPTF_Var_newCharstringlist(c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_ListString&"."&c_EPTF_CLL_DataSourceClient_Test_DSOwnerDataVarName, c_EPTF_CLL_DataSourceClient_Test_DSOwnerListStringInit, vl_varIdx);
|
| f_EPTF_Var_newFloatlist(c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_ListFloat&"."&c_EPTF_CLL_DataSourceClient_Test_DSOwnerDataVarName, c_EPTF_CLL_DataSourceClient_Test_DSOwnerListFloatInit, vl_varIdx);
|
| f_EPTF_DataSourceClient_registerCondition(c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName, f_EPTF_Base_selfName(), refers(f_EPTF_CLL_DataSourceClient_conditionHandler), c_EPTF_CLL_DataSourceClient_Test_DSOwnerMethodName);
|
| f_EPTF_DataSourceClient_registerCondition(c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName, f_EPTF_Base_selfName(), refers(f_EPTF_CLL_DataSourceClient_conditionHandler), c_EPTF_CLL_DataSourceClient_Test_DSOwnerMethod2Name);
|
| f_EPTF_DataSourceClient_registerData(c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName, f_EPTF_Base_selfName(), refers(f_EPTF_CLL_DataSourceClient_mainDSServer));
|
| f_EPTF_DataSourceClient_registerDataValue(c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName, f_EPTF_Base_selfName(), refers(f_EPTF_CLL_DataSourceClient_getValueHandler));
|
| f_EPTF_DataSourceClient_registerSetDataValue(c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName, f_EPTF_Base_selfName(), refers(f_EPTF_CLL_DataSourceClient_setValueHandler));
|
|
|
| if (pl_errMessage != "") {
|
| f_EPTF_Base_setNegativeTestMode();
|
| f_EPTF_Base_setExpectedErrorMsg(pl_errMessage);
|
| }
|
| if (pl_warningMessage != "") {
|
| f_EPTF_Logging_setExpectedWarningMsg(pl_warningMessage);
|
| }
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
| public function f_EPTF_CLL_DataSourceClient_mainDSServer(
|
| out charstring pl_dataVarName,
|
| in charstring pl_source,
|
| in charstring pl_ptcName,
|
| in charstring pl_element,
|
| in EPTF_DataSource_Params pl_params
|
|
|
| ) runs on EPTF_CLL_DataSource_Client_CT return integer {
|
| if (pl_source!=c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName
|
| or (pl_element != c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName
|
| and pl_element != c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2
|
| and pl_element != c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List
|
| and pl_element != c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_ListString
|
| and pl_element != c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_ListFloat)
|
| ) {
|
| return 1; // incorrect params
|
| }
|
|
|
| //check for built in error
|
| var EPTF_CharstringList pl_result := {}
|
| f_EPTF_DataSource_extractParams(pl_params,
|
| {c_TestNonBlocking_BuiltIn_Error_paramName},
|
| pl_result
|
| );
|
| if (pl_result[0] != "") {
|
| pl_dataVarName := "error on demand";
|
| return 2; // error on demand
|
| }
|
|
|
| pl_dataVarName := pl_element&"."&c_EPTF_CLL_DataSourceClient_Test_DSOwnerDataVarName;
|
| return 0;
|
| }
|
|
|
| public function f_EPTF_CLL_DataSourceClient_getValueHandler(
|
| out EPTF_Var_DirectContent pl_dataValue,
|
| in charstring pl_dataSource,
|
| in charstring pl_ptcName,
|
| in charstring pl_element,
|
| in EPTF_DataSource_Params pl_params
|
| ) runs on EPTF_DataSourceClient_CT return integer {
|
| if (pl_dataSource != c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName or
|
| (pl_element != c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_Value
|
| and pl_element != c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName
|
| and pl_element != c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List)) {
|
| return 1; //incorrect param
|
| }
|
|
|
| //set new value
|
| var integer vl_toSet := c_EPTF_CLL_DataSourceClient_Test_BuiltInDataValue;
|
| var EPTF_CharstringList vl_result := {}
|
| f_EPTF_DataSource_extractParams(pl_params,
|
| {c_EPTF_CLL_DataSourceClient_Test_DSOwnerValueHandlerParam, c_EPTF_CLL_DataSourceClient_Test_DSOwnerValueHandlerParam2},
|
| vl_result
|
| );
|
|
|
| var integer vl_results := sizeof(vl_result);
|
| for(var integer i := 0; i < vl_results; i := i + 1)
|
| {
|
| if (vl_result[i] != "") {
|
| vl_toSet := vl_toSet + str2int(vl_result[i]);
|
| }
|
| }
|
|
|
| if (pl_element == c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName or pl_element == c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List) {
|
| if (vl_result[0] == "") {
|
| return 1; //incorrect param
|
| }
|
| }
|
|
|
| if (pl_element == c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List) {
|
| pl_dataValue := {integerlistVal := c_EPTF_CLL_DataSourceClient_Test_BuiltInDataValueList};
|
| } else {
|
| pl_dataValue := {intVal := vl_toSet};
|
| }
|
| return 0;
|
| }
|
|
|
| function f_EPTF_CLL_DataSourceClient_setValueHandler(
|
| inout EPTF_Var_DirectContent pl_dataValue,
|
| in charstring pl_dataSource,
|
| in charstring pl_ptcName,
|
| in charstring pl_dataElement,
|
| in EPTF_DataSource_Params pl_params,
|
| in EPTF_IntegerList pl_indexList
|
| ) runs on EPTF_DataSourceClient_CT return integer {
|
|
|
| if (pl_dataSource != c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName or
|
| ( pl_dataElement != c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_Value
|
| and pl_dataElement != c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName
|
| and pl_dataElement != c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List)) {
|
| return -1; //incorrect param
|
| }
|
|
|
| if (pl_dataElement == c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_Value or pl_dataElement == c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName) {
|
| if (not ischosen(pl_dataValue.intVal)) {
|
| return -2; //incorrect value
|
| }
|
| }
|
|
|
| if (pl_dataElement == c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List) {
|
| if (not ischosen(pl_dataValue.integerlistVal)) {
|
| return -2; //incorrect value
|
| }
|
| }
|
|
|
| var EPTF_CharstringList pl_result := {};
|
| f_EPTF_DataSource_extractParams(pl_params,
|
| {c_EPTF_CLL_DataSourceClient_Test_DSOwnerValueHandlerParam},
|
| pl_result
|
| );
|
|
|
| if (pl_dataElement == c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName or pl_dataElement == c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List) {
|
| if (pl_result[0] == "") {
|
| return -1; //incorrect param
|
| }
|
| }
|
|
|
| if (pl_dataElement == c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List) {
|
| pl_dataValue := {integerlistVal := pl_indexList};
|
| } else {
|
| //set new value
|
| var integer vl_toSet := pl_dataValue.intVal;
|
| if (pl_result[0] != "") {
|
| vl_toSet := vl_toSet + str2int(pl_result[0]);
|
| }
|
| pl_dataValue := {intVal := vl_toSet};
|
| }
|
| return 0;
|
| }
|
|
|
| function f_EPTF_CLL_DataSourceClient_conditionHandler(
|
| out boolean pl_conditionValue,
|
| in charstring pl_source,
|
| in charstring pl_ptcName,
|
| in charstring pl_method,
|
| in EPTF_DataSource_Params pl_params
|
| ) runs on EPTF_CLL_DataSource_Client_CT return integer {
|
| if (pl_source!=c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName
|
| or (pl_method != c_EPTF_CLL_DataSourceClient_Test_DSOwnerMethodName and pl_method != c_EPTF_CLL_DataSourceClient_Test_DSOwnerMethod2Name)) {
|
| return 1; // incorrect params
|
| }
|
| if (pl_method == c_EPTF_CLL_DataSourceClient_Test_DSOwnerMethodName) {
|
| pl_conditionValue := true;
|
| } else if (pl_method == c_EPTF_CLL_DataSourceClient_Test_DSOwnerMethod2Name) {
|
| pl_conditionValue := false;
|
| }
|
| return 0;
|
| }
|
|
|
|
|
| function f_EPTF_CLL_DataSourceClient_Test_dsRequesterBehaviour(in charstring pl_selfName, in EPTF_DataSource_CT pl_sourceCompRef) runs on EPTF_CLL_DataSource_Client_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_sourceCompRef);
|
|
|
| var charstring vl_dataVarName;
|
| f_EPTF_DataSourceClient_getData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName,
|
| pl_params := {{"paramX", "valueX"}, {"paramA", "valueA"}} // they are not in lexical order!
|
| );
|
|
|
| if (f_EPTF_Var_getId(vl_dataVarName)==-1) {
|
| setverdict(fail, "Returned data variable name is incorrect.")
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| // check the value:
|
| if (0!=f_EPTF_Var_getIntValue(f_EPTF_Var_getId(vl_dataVarName))) {
|
| setverdict(fail, "Inital value of the variable is incorrect. Expecting 0, got: ",f_EPTF_Var_getIntValue(f_EPTF_Var_getId(vl_dataVarName)))
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
|
|
| // check the checkData function:
|
| var charstring vl_dataVarName_check;
|
| var integer vl_errorCode := f_EPTF_DataSourceClient_checkData(
|
| pl_dataVarName := vl_dataVarName_check,
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName,
|
| pl_params := {{"paramX", "valueX"}, {"paramA", "valueA"}}
|
| );
|
|
|
| if (vl_errorCode!=0) {
|
| setverdict(fail, "CheckData returned an error: ",vl_errorCode)
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| if (vl_dataVarName != vl_dataVarName_check) {
|
| setverdict(fail, "CheckData returned an invalid variable name: ",vl_dataVarName_check,". Should be: ",vl_dataVarName)
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
|
|
| // check data for datalement2"
|
| var charstring vl_dataVarName2_check;
|
| vl_errorCode := f_EPTF_DataSourceClient_checkData(
|
| pl_dataVarName := vl_dataVarName2_check,
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2,
|
| pl_params := {}
|
| );
|
|
|
| if (vl_errorCode!=0) {
|
| setverdict(fail, "CheckData returned an error: ",vl_errorCode)
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| // if (f_EPTF_Var_getId(vl_dataVarName2_check)!=-1) {
|
| // setverdict(fail, "The local variable exists on local component while subscription was not performed by DataSource.")
|
| // f_EPTF_Base_stopAll(none);
|
| // }
|
|
|
| var charstring vl_dataVarName2;
|
| f_EPTF_DataSourceClient_getData(
|
| pl_dataVarName := vl_dataVarName2,
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2,
|
| pl_params := {}
|
| );
|
|
|
| if (f_EPTF_Var_getId(vl_dataVarName2)==-1) {
|
| setverdict(fail, "Returned data variable name is incorrect.")
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| // check the value:
|
| if (2!=f_EPTF_Var_getIntValue(f_EPTF_Var_getId(vl_dataVarName2))) {
|
| setverdict(fail, "Inital value of the variable is incorrect. Expecting 2, got: ",f_EPTF_Var_getIntValue(f_EPTF_Var_getId(vl_dataVarName2)))
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
|
|
| if (vl_dataVarName2 != vl_dataVarName2_check) {
|
| setverdict(fail, "CheckData returned an invalid variable name: ",vl_dataVarName2_check,". Should be: ",vl_dataVarName2)
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
|
|
| setverdict(pass);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| function f_EPTF_CLL_DataSourceClient_Test_dsRequesterBehaviour_getDataValue(in charstring pl_selfName, in EPTF_DataSource_CT pl_sourceCompRef) runs on EPTF_CLL_DataSource_Client_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_sourceCompRef);
|
|
|
| var EPTF_Var_DirectContent vl_dataValue;
|
| f_EPTF_DataSourceClient_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName,
|
| pl_params := {{"paramX", "valueX"}, {"paramA", "valueA"}} // they are not in lexical order!
|
| );
|
|
|
| // check the value:
|
| if (vl_dataValue != {intVal := 0}) {
|
| setverdict(fail, "Inital value of the variable is incorrect. Expecting 0, got: ",vl_dataValue)
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
|
|
|
|
| var EPTF_Var_DirectContent vl_dataValue2;
|
| f_EPTF_DataSourceClient_getDataValue(
|
| pl_dataValue := vl_dataValue2,
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2,
|
| pl_params := {}
|
| );
|
|
|
| // check the value:
|
| if (vl_dataValue2 != {intVal := 2}) {
|
| setverdict(fail, "Inital value of the variable is incorrect. Expecting 2, got: ",vl_dataValue2)
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
|
|
| setverdict(pass);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| function f_EPTF_CLL_DataSourceClient_Test_dsRequesterBehaviour_setDataValue(in charstring pl_selfName, in EPTF_DataSource_CT pl_sourceCompRef) runs on EPTF_CLL_DataSource_Client_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_sourceCompRef);
|
|
|
| var EPTF_Var_DirectContent vl_dataValue;
|
| f_EPTF_DataSourceClient_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName,
|
| pl_params := {{"paramX", "valueX"}, {"paramA", "valueA"}} // they are not in lexical order!
|
| );
|
|
|
| // check the value:
|
| if (vl_dataValue != {intVal := 0}) {
|
| setverdict(fail, "Inital value of the variable is incorrect. Expecting 0, got: ",vl_dataValue)
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| vl_dataValue := {intVal := 1}
|
| f_EPTF_DataSourceClient_setDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName,
|
| pl_params := {{"paramX", "valueX"}, {"paramA", "valueA"}} // they are not in lexical order!
|
| );
|
|
|
| // check the value:
|
| if (vl_dataValue != {intVal := 1}) {
|
| setverdict(fail, "Updated value of the variable is incorrect. Expecting 1, got: ",vl_dataValue)
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| f_EPTF_DataSourceClient_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName,
|
| pl_params := {{"paramX", "valueX"}, {"paramA", "valueA"}} // they are not in lexical order!
|
| );
|
|
|
| // check the value:
|
| if (vl_dataValue != {intVal := 1}) {
|
| setverdict(fail, "Value after getDataValue of the variable is incorrect. Expecting 1, got: ",vl_dataValue)
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
|
|
| var EPTF_Var_DirectContent vl_dataValue2;
|
| f_EPTF_DataSourceClient_getDataValue(
|
| pl_dataValue := vl_dataValue2,
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2,
|
| pl_params := {}
|
| );
|
|
|
| // check the value:
|
| if (vl_dataValue2 != {intVal := 2}) {
|
| setverdict(fail, "Inital value of the variable is incorrect. Expecting 2, got: ",vl_dataValue2)
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| vl_dataValue2 := {intVal := 3}
|
| f_EPTF_DataSourceClient_setDataValue(
|
| pl_dataValue := vl_dataValue2,
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2,
|
| pl_params := {}
|
| );
|
|
|
| // check the value:
|
| if (vl_dataValue2 != {intVal := 3}) {
|
| setverdict(fail, "New value of the variable is incorrect. Expecting 3, got: ",vl_dataValue2)
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| f_EPTF_DataSourceClient_getDataValue(
|
| pl_dataValue := vl_dataValue2,
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2,
|
| pl_params := {}
|
| );
|
|
|
| // check the value:
|
| if (vl_dataValue2 != {intVal := 3}) {
|
| setverdict(fail, "Value after getDataValue of the variable is incorrect. Expecting 3, got: ",vl_dataValue2)
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
|
|
| setverdict(pass);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| } // group GetDataFromClient
|
|
|
| group GUITest{
|
|
|
| public function f_EPTF_CLL_DataSourceGUI_Test_clientBehavior( in EPTF_DataSource_CT pl_server)
|
| runs on EPTF_CLL_DataSource_Client_CT
|
| {
|
| var integer vl_idx;
|
| f_EPTF_Var_init_CT("GUIDataSource Client");
|
| f_EPTF_DataSourceClient_init_CT("GUIDataSourceClient", pl_server);
|
|
|
| var EPTF_CharstringList vl_cList := {"LGen1", "LGen2", "LGen3"}
|
| f_EPTF_Var_newCharstringlist(c_EPTF_CLL_DataSource_Test_var_prefix & "LGens", vl_cList ,vl_idx);
|
| vl_cList := {"EG1", "EG2", "EG3"}
|
| f_EPTF_Var_newCharstringlist(c_EPTF_CLL_DataSource_Test_var_prefix & "EntityGroups", vl_cList ,vl_idx);
|
| vl_cList := {"SC1", "SC2", "SC3"}
|
| f_EPTF_Var_newCharstringlist(c_EPTF_CLL_DataSource_Test_var_prefix & "Scenarios", vl_cList ,vl_idx);
|
| f_EPTF_Var_newInt(c_EPTF_CLL_DataSource_Test_var_prefix & "ECount1", 101, vl_idx)
|
| f_EPTF_Var_newInt(c_EPTF_CLL_DataSource_Test_var_prefix & "ECount2", 102, vl_idx)
|
| f_EPTF_Var_newInt(c_EPTF_CLL_DataSource_Test_var_prefix & "ECount3", 103, vl_idx)
|
|
|
| f_EPTF_DataSourceClient_registerData("LGenBase", "LGen1", refers(f_EPTF_CLL_DataSourceGUI_preProcessorData));
|
| f_EPTF_DataSourceClient_registerData("LGenBase", "LGen2", refers(f_EPTF_CLL_DataSourceGUI_preProcessorData));
|
| f_EPTF_DataSourceClient_registerData("LGenBase", "LGen3", refers(f_EPTF_CLL_DataSourceGUI_preProcessorData));
|
| f_EPTF_DataSourceClient_registerData("ExecCtrl", "LGen1", refers(f_EPTF_CLL_DataSourceGUI_preProcessorData));
|
| f_EPTF_DataSourceClient_registerData("ExecCtrl", "" , refers(f_EPTF_CLL_DataSourceGUI_preProcessorData));
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| f_EPTF_Base_stopAll();
|
| }
|
|
|
| public function f_EPTF_CLL_DataSourceGUI_preProcessorData( out charstring pl_dataVarName,
|
| in charstring pl_source,
|
| in charstring pl_ptcName,
|
| in charstring pl_element,
|
| in EPTF_DataSource_Params pl_params
|
|
|
| ) runs on EPTF_CLL_DataSource_Client_CT return integer{
|
| action(%definitionId&": ",pl_source, ",",pl_element)
|
| select( true ){
|
| case(pl_element == "LGenList"){
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "LGens"
|
| return 0;
|
| }
|
| case(pl_element == "EntityGroups"){
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "EntityGroups"
|
| return 0;
|
| }
|
| case(pl_element == "Scenarios"){
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "Scenarios"
|
| return 0;
|
| }
|
| case(pl_element == "EntityCount"){
|
| select( true ){
|
| case ( pl_params[0].paramValue == "EG1" ){
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "ECount1"
|
| return 0;
|
| }
|
| case ( pl_params[0].paramValue == "EG2" ){
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "ECount2"
|
| return 0;
|
| }
|
| case ( pl_params[0].paramValue == "EG3" ){
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "ECount3"
|
| return 0;
|
| }
|
| }
|
|
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "Scenarios"
|
| return 0;
|
| }
|
|
|
| }
|
| return -1;
|
| }
|
|
|
| }
|
|
|
| function f_EPTF_DataSourceClient_behaviour(
|
| in charstring pl_dataProviderName,
|
| in EPTF_DataSource_CT pl_dataSourceCompRef,
|
| in charstring pl_selfName := "EPTF_CLL_DataSourceClient_Test"
|
| ) runs on EPTF_CLL_DataSource_Client_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_dataSourceCompRef);
|
| f_EPTF_DataSourceClient_registerData(
|
| pl_source := pl_dataProviderName,
|
| pl_ptcName := f_EPTF_Base_selfName(),
|
| pl_dataHandler := refers(f_EPTF_DataSourceClient_testIteratorHandler)
|
| );
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
|
|
| function f_EPTF_DataSourceClient_testIteratorHandler(
|
| out charstring pl_dataVarName,
|
| in charstring pl_dataSource,
|
| in charstring pl_ptcName,
|
| in charstring pl_dataElement,
|
| in EPTF_DataSource_Params pl_params
|
| ) runs on EPTF_DataSourceClient_CT return integer {
|
| pl_dataVarName := "IteratorVarName"&pl_dataElement&log2str(pl_params);
|
| var integer vl_varIdx;
|
| //create iterator var if not exist for test
|
| if (f_EPTF_Var_getId(pl_dataVarName)==-1) {
|
| f_EPTF_Var_newCharstringlist(pl_dataVarName,{"3","4"},vl_varIdx);
|
| }
|
| return 0;
|
| }
|
|
|
| function f_EPTF_DataSourceClient_CheckParamOrder_IteratorHandler(
|
| out charstring pl_dataVarName,
|
| in charstring pl_dataSource,
|
| in charstring pl_ptcName,
|
| in charstring pl_dataElement,
|
| in EPTF_DataSource_Params pl_params
|
| ) runs on EPTF_DataSourceClient_CT return integer {
|
| if (sizeof(pl_params)!=2) {
|
| pl_dataVarName := log2str(%definitionId&": Custom warning: Wrong number of params for Element "&pl_dataElement);
|
| return 1; // invalid number of params
|
| }
|
| pl_dataVarName := "IteratorVarName"&pl_dataElement&log2str(pl_params);
|
| var integer vl_varIdx;
|
| //create iterator var if not exist for test
|
| var EPTF_CharstringList vl_dataValue := {};
|
| for(var integer i:=0; i<sizeof(pl_params);i:=i+1) {
|
| vl_dataValue := vl_dataValue&{pl_params[i].paramValue};
|
| }
|
| if (f_EPTF_Var_getId(pl_dataVarName)==-1) {
|
| f_EPTF_Var_newCharstringlist(pl_dataVarName,vl_dataValue,vl_varIdx);
|
| if (pl_params[0].paramName == "read-only") {
|
| // set it to read-only:
|
| var EPTF_Var_ProviderLocal vl_localProvider := {
|
| {null,{0},{}}
|
| }
|
| f_EPTF_Var_subscribeLocal(vl_varIdx,vl_localProvider);
|
| }
|
| }
|
| return 0;
|
| }
|
|
|
| function f_EPTF_DataSourceClient_getDataTest_dataHandler(
|
| out charstring pl_dataVarName,
|
| in charstring pl_dataSource,
|
| in charstring pl_ptcName,
|
| in charstring pl_dataElement,
|
| in EPTF_DataSource_Params pl_params
|
| ) runs on EPTF_DataSourceClient_CT return integer {
|
| if (not match(pl_dataElement,pattern "data*")) {
|
| pl_dataVarName := log2str(%definitionId&": Custom warning: Wrong element name for DataSource "&pl_dataSource&": ",pl_dataElement);
|
| return 2; // invalid element name
|
| }
|
| if (sizeof(pl_params)!=2) {
|
| pl_dataVarName := log2str(%definitionId&": Custom warning: Wrong number of params for Element "&pl_dataElement);
|
| return 1; // invalid number of params
|
| }
|
| pl_dataVarName := "IteratorVarName"&pl_dataElement&log2str(pl_params);
|
| var integer vl_varIdx;
|
| //create iterator var if not exist for test
|
| var EPTF_CharstringList vl_dataValue := {};
|
| for(var integer i:=0; i<sizeof(pl_params);i:=i+1) {
|
| vl_dataValue := vl_dataValue&{pl_params[i].paramValue};
|
| }
|
| if (f_EPTF_Var_getId(pl_dataVarName)==-1) {
|
| f_EPTF_Var_newCharstringlist(pl_dataVarName,vl_dataValue,vl_varIdx);
|
| if (pl_params[0].paramName == "read-only") {
|
| // set it to read-only:
|
| var EPTF_Var_ProviderLocal vl_localProvider := {
|
| {null,{0},{}}
|
| }
|
| f_EPTF_Var_subscribeLocal(vl_varIdx,vl_localProvider);
|
| }
|
| }
|
| return 0;
|
| }
|
|
|
| function f_EPTF_DataSourceClient_CheckParamOrder_IteratorValueHandler(
|
| out EPTF_Var_DirectContent pl_dataValue,
|
| in charstring pl_dataSource,
|
| in charstring pl_ptcName,
|
| in charstring pl_dataElement,
|
| in EPTF_DataSource_Params pl_params
|
| ) runs on EPTF_DataSourceClient_CT return integer {
|
| if (not match(pl_dataElement,pattern "value*")) {
|
| pl_dataValue := {charstringVal := log2str(%definitionId&": Custom warning: Wrong element name for DataSource "&pl_dataSource&": ",pl_dataElement)};
|
| return 2; // invalid element name
|
| }
|
| if (sizeof(pl_params)!=3) {
|
| pl_dataValue := {charstringVal := log2str(%definitionId&": Custom warning: Wrong number of params for Element "&pl_dataElement)};
|
| return 1; // invalid number of params
|
| }
|
| pl_dataValue := {charstringlistVal :={}};
|
| for(var integer i:=0; i<sizeof(pl_params);i:=i+1) {
|
| pl_dataValue := {charstringlistVal := pl_dataValue.charstringlistVal&{pl_params[i].paramValue}};
|
| }
|
| return 0;
|
| }
|
|
|
| // the help database for DummySource
|
| const EPTF_DataSource_Help_DataElementChildren c_EPTF_DataSource_helpTest := {
|
| {
|
| dataElement := {
|
| name := c_EPTF_DataSource_dataElement_Help,
|
| valueType := charstringType,
|
| description := "This data element returns the help information about all dataElements supported in DummySource",
|
| parameters := {
|
| {
|
| name := c_EPTF_DataSource_paramNameHelpFormat,
|
| typeDescriptor := {
|
| valueType := charstringType
|
| },
|
| description := "The format of the output. Valid values: "
|
| &c_EPTF_DataSource_helpFormatJSON&" , "&c_EPTF_DataSource_helpFormatTEXT
|
| &". Default: "&c_EPTF_DataSource_helpFormatJSON,
|
| exampleValue := c_EPTF_DataSource_helpFormatTEXT
|
| }
|
| }
|
| },
|
| children := {}
|
| },
|
| {
|
| dataElement := {
|
| name := "ElementWithUnspecifiedTypeDescr",
|
| valueType := charstringType,
|
| description := "Help dataelement test with unspecified typeDescriptor",
|
| parameters := {
|
| }
|
| },
|
| children := {}
|
| },
|
| {
|
| dataElement := {
|
| name := "ElementWith_TypeDescr==omit",
|
| valueType := charstringType,
|
| typeDescriptor := omit,
|
| description := "Help dataelement test with typeDescriptor==omit",
|
| parameters := {
|
| }
|
| },
|
| children := {}
|
| },
|
| {
|
| dataElement := {
|
| name := "ElementListOfItem",
|
| valueType := charstringType,
|
| typeDescriptor := {
|
| isListOf := true,
|
| typeName := "Item"
|
| },
|
| description := "Help dataelement test with isListOf==true",
|
| parameters := {
|
| }
|
| },
|
| children := {}
|
| },
|
| {
|
| dataElement := {
|
| name := "SingleItem",
|
| valueType := charstringType,
|
| typeDescriptor := {
|
| isListOf := false,
|
| typeName := "Item"
|
| },
|
| description := "Help dataelement test with isListOf==false",
|
| parameters := {
|
| }
|
| },
|
| children := {}
|
| },
|
| {
|
| dataElement := {
|
| name := "SingleItemWithOmit",
|
| valueType := charstringType,
|
| typeDescriptor := {
|
| isListOf := omit,
|
| typeName := "Item"
|
| },
|
| description := "Help dataelement test with isListOf==omit",
|
| parameters := {
|
| }
|
| },
|
| children := {}
|
| },
|
| {
|
| dataElement := {
|
| name := "SingleItemListNotSpecified",
|
| valueType := charstringType,
|
| typeDescriptor := {
|
| typeName := "Item"
|
| },
|
| description := "Help dataelement test with unspecified isListOf",
|
| parameters := {
|
| }
|
| },
|
| children := {}
|
| },
|
| {
|
| dataElement := {
|
| name := "ParamTypeDescr==valueType",
|
| valueType := charstringType,
|
| description := "Help dataelement parameter test",
|
| parameters := {
|
| {
|
| name := c_EPTF_DataSource_paramNameHelpFormat,
|
| typeDescriptor := {
|
| valueType := charstringType
|
| },
|
| description := "Parameter with ParamTypeDescr==valueType",
|
| exampleValue := c_EPTF_DataSource_helpFormatTEXT
|
| }
|
| }
|
| },
|
| children := {}
|
| },
|
| {
|
| dataElement := {
|
| name := "ParamTypeDescr==reference_isListOf_unspecified",
|
| valueType := charstringType,
|
| description := "Help dataelement parameter test",
|
| parameters := {
|
| {
|
| name := c_EPTF_DataSource_paramNameHelpFormat,
|
| typeDescriptor := {
|
| reference := {
|
| typeName := "ParamType"
|
| }
|
| },
|
| description := "Parameter with ParamTypeDescr==reference isIndexInListOf unspecified",
|
| exampleValue := c_EPTF_DataSource_helpFormatTEXT
|
| }
|
| }
|
| },
|
| children := {}
|
| },
|
| {
|
| dataElement := {
|
| name := "ParamTypeDescr==reference_isIndexInListOf==omit",
|
| valueType := charstringType,
|
| description := "Help dataelement parameter test",
|
| parameters := {
|
| {
|
| name := c_EPTF_DataSource_paramNameHelpFormat,
|
| typeDescriptor := {
|
| reference := {
|
| isIndexInListOf := omit,
|
| typeName := "ParamType"
|
| }
|
| },
|
| description := "Parameter with ParamTypeDescr==reference isIndexInListOf==omit",
|
| exampleValue := c_EPTF_DataSource_helpFormatTEXT
|
| }
|
| }
|
| },
|
| children := {}
|
| },
|
| {
|
| dataElement := {
|
| name := "ParamTypeDescr==reference_isIndexInListOf==false",
|
| valueType := charstringType,
|
| description := "Help dataelement parameter test",
|
| parameters := {
|
| {
|
| name := c_EPTF_DataSource_paramNameHelpFormat,
|
| typeDescriptor := {
|
| reference := {
|
| isIndexInListOf := false,
|
| typeName := "ParamType"
|
| }
|
| },
|
| description := "Parameter with ParamTypeDescr==reference isIndexInListOf==false",
|
| exampleValue := c_EPTF_DataSource_helpFormatTEXT
|
| }
|
| }
|
| },
|
| children := {}
|
| },
|
| {
|
| dataElement := {
|
| name := "ParamTypeDescr==reference_isIndexInListOf==true",
|
| valueType := charstringType,
|
| description := "Help dataelement parameter test",
|
| parameters := {
|
| {
|
| name := c_EPTF_DataSource_paramNameHelpFormat,
|
| typeDescriptor := {
|
| reference := {
|
| isIndexInListOf := true,
|
| typeName := "ParamType"
|
| }
|
| },
|
| description := "Parameter with ParamTypeDescr==reference isIndexInListOf==true",
|
| exampleValue := c_EPTF_DataSource_helpFormatTEXT
|
| }
|
| }
|
| },
|
| children := {}
|
| }
|
| }
|
|
|
| function f_EPTF_DataSourceClient_getHelpDataValueTest(in charstring pl_source, in charstring pl_element, in charstring pl_expectedPattern := "") runs on EPTF_CLL_DataSource_Source_CT {
|
| var EPTF_Var_DirectContent vl_helpFromGetDataValueTEXT;
|
| var EPTF_Var_DirectContent vl_helpFromGetDataValueJSON;
|
| f_EPTF_DataSource_getDataValue(
|
| pl_dataValue := vl_helpFromGetDataValueTEXT,
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_DataSource_dataElement_Help,
|
| pl_params := {
|
| {
|
| paramName := c_EPTF_DataSource_paramNameHelpFormat,
|
| paramValue := c_EPTF_DataSource_helpFormatTEXT
|
| },
|
| {
|
| paramName := c_EPTF_DataSource_paramNameSource,
|
| paramValue := pl_source
|
| },
|
| {
|
| paramName := c_EPTF_DataSource_paramNameElement,
|
| paramValue := pl_element
|
| }
|
| }
|
| );
|
| f_EPTF_DataSource_getDataValue(
|
| pl_dataValue := vl_helpFromGetDataValueJSON,
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_DataSource_dataElement_Help,
|
| pl_params := {
|
| {
|
| paramName := c_EPTF_DataSource_paramNameHelpFormat,
|
| paramValue := c_EPTF_DataSource_helpFormatJSON
|
| },
|
| {
|
| paramName := c_EPTF_DataSource_paramNameSource,
|
| paramValue := pl_source
|
| },
|
| {
|
| paramName := c_EPTF_DataSource_paramNameElement,
|
| paramValue := pl_element
|
| }
|
| }
|
| );
|
| action("Help string in TEXT format from getDataValue: ", vl_helpFromGetDataValueTEXT);
|
| action("Help string in JSON format from getDataValue: ", vl_helpFromGetDataValueJSON);
|
| var charstring vl_filtered;
|
| var octetstring vl_filteredJSON;
|
| vl_filtered := f_EPTF_DataSource_getHelpTEXT(pl_source,pl_element);
|
| action("Help for all DS: ", vl_filtered);
|
| vl_filteredJSON := f_EPTF_DataSource_getHelpJSON(pl_source,pl_element);
|
| action("HelpJSON for all DS: ", vl_filteredJSON);
|
|
|
| if (not ischosen(vl_helpFromGetDataValueTEXT.charstringVal) or vl_helpFromGetDataValueTEXT.charstringVal!=vl_filtered or vl_filtered == "" ) {
|
| setverdict(fail, "TEXT help is incorrect");
|
| }
|
| if (not ischosen(vl_helpFromGetDataValueJSON.octetstringVal) or vl_helpFromGetDataValueJSON.octetstringVal!=vl_filteredJSON) {
|
| setverdict(fail, "JSON help is incorrect");
|
| }
|
|
|
| if (pl_expectedPattern!="") {
|
| // check if the TEXT help contains the pattern:
|
| if(not match(vl_filtered,pattern pl_expectedPattern)) {
|
| setverdict(fail,"The TEXT help does not match the expected pattern: ", match(vl_filtered,pattern pl_expectedPattern));
|
| }
|
| }
|
|
|
| }
|
|
|
| function f_EPTF_DataSource_getHelpApidocTest(in charstring pl_source, in charstring pl_element, in charstring pl_expectedPattern := "") runs on EPTF_CLL_DataSource_Source_CT {
|
| var charstring vl_apidocHelp := f_EPTF_DataSource_getHelpApidoc(
|
| pl_source := pl_source,
|
| pl_element := pl_element
|
| );
|
| action("APIDoc Help string: ", vl_apidocHelp);
|
| if (pl_expectedPattern!="") {
|
| // check if the TEXT help contains the pattern:
|
| if(not match(vl_apidocHelp,pattern pl_expectedPattern)) {
|
| setverdict(fail,"The APIDoc help text does not match the expected pattern: ", match(vl_apidocHelp,pattern pl_expectedPattern));
|
| }
|
| }
|
|
|
| }
|
|
|
| function f_EPTF_DataSourceClient_helpHandlerTest(
|
| out EPTF_Var_DirectContent pl_dataValue,
|
| in charstring pl_dataSource,
|
| in charstring pl_ptcName,
|
| in charstring pl_dataElement,
|
| in EPTF_DataSource_Params pl_params
|
| ) runs on EPTF_DataSourceClient_CT return integer {
|
| if (pl_dataElement!=c_EPTF_DataSource_dataElement_Help) {
|
| pl_dataValue := {charstringVal := log2str(%definitionId&": Custom warning: Wrong element name for DataSource "&pl_dataSource&": ",pl_dataElement)};
|
| return 2; // invalid element name
|
| }
|
| return f_EPTF_DataSource_handleHelp(pl_dataValue,pl_dataSource,pl_params,c_EPTF_DataSource_helpTest);
|
| }
|
|
|
| function f_EPTF_DataSourceClient_CheckParamOrder_IteratorSetValueHandler(
|
| inout EPTF_Var_DirectContent pl_dataValue,
|
| in charstring pl_dataSource,
|
| in charstring pl_ptcName,
|
| in charstring pl_dataElement,
|
| in EPTF_DataSource_Params pl_params,
|
| in EPTF_IntegerList pl_indexList
|
| ) runs on EPTF_DataSourceClient_CT return integer {
|
| if (not match(pl_dataElement,pattern "value*")) {
|
| pl_dataValue := {charstringVal := log2str(%definitionId&": Custom warning: Wrong element name for DataSource "&pl_dataSource&": ",pl_dataElement)};
|
| return -2; // invalid element name
|
| }
|
| if (sizeof(pl_params)!=3) {
|
| pl_dataValue := {charstringVal := log2str(%definitionId&": Custom warning: Wrong number of params for Element "&pl_dataElement)};
|
| return -1; // invalid number of params
|
| }
|
| if (pl_params[0].paramName == "read-only") {
|
| pl_dataValue := {charstringVal := log2str(%definitionId&": Custom warning: Data is read-only for ",pl_dataElement, " params: ", pl_params)};
|
| return -2; // read-only value
|
| }
|
| if (pl_params[0].paramName == "read-only-2") {
|
| pl_dataValue := {charstringVal := log2str(%definitionId&": Custom warning: Data is read-only for ",pl_dataElement, " params: ", pl_params)};
|
| return 2; // read-only value, getData handler is not called
|
| }
|
| // store value in pl_dataValue:
|
| //.... do nothing, (it is not stored)
|
| return 0;
|
| }
|
|
|
| function f_EPTF_DataSourceClient_getCondition_handler_isEqual(
|
| out boolean pl_conditionValue,
|
| in charstring pl_dataSource,
|
| in charstring pl_ptcName,
|
| in charstring pl_method,
|
| in EPTF_DataSource_Params pl_params
|
| ) runs on EPTF_DataSourceClient_CT return integer {
|
| if (sizeof(pl_params)!=2) {
|
| return 1; // invalid number of params
|
| }
|
| pl_conditionValue := (pl_params[0].paramValue == pl_params[1].paramValue);
|
| return 0;
|
| }
|
|
|
| function f_EPTF_DataSourceClient_getCondition_handler_isNotEqual(
|
| out boolean pl_conditionValue,
|
| in charstring pl_dataSource,
|
| in charstring pl_ptcName,
|
| in charstring pl_method,
|
| in EPTF_DataSource_Params pl_params
|
| ) runs on EPTF_DataSourceClient_CT return integer {
|
| if (sizeof(pl_params)!=2) {
|
| return 1; // invalid number of params
|
| }
|
| pl_conditionValue := (pl_params[0].paramValue != pl_params[1].paramValue);
|
| return 0;
|
| }
|
|
|
| function f_EPTF_DataSourceClient_getCondition_behaviour(in charstring pl_dataProviderName, in EPTF_DataSource_CT pl_dataSourceCompRef) runs on EPTF_CLL_DataSource_Client_CT {
|
| f_EPTF_DataSourceClient_init_CT("EPTF_CLL_DataSourceClient_Test",pl_dataSourceCompRef);
|
| // register with specified name:
|
| f_EPTF_DataSourceClient_registerCondition(
|
| pl_source := pl_dataProviderName,
|
| pl_ptcName := f_EPTF_Base_selfName(),
|
| pl_conditionHandler := refers(f_EPTF_DataSourceClient_getCondition_handler_isEqual),
|
| pl_method := "isEqual"
|
| );
|
| // register with default name:
|
| f_EPTF_DataSourceClient_registerCondition(
|
| pl_source := pl_dataProviderName,
|
| pl_ptcName := f_EPTF_Base_selfName(),
|
| pl_conditionHandler := refers(f_EPTF_DataSourceClient_getCondition_handler_isNotEqual)
|
| );
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
| ///////////////////////////////////////////////////////////
|
| // Testcase: f_EPTF_GUIDataSource_Test_ClientBehavior
|
| //
|
| // Purpose:
|
| //
|
| // Parameters:
|
| //
|
| ///////////////////////////////////////////////////////////
|
| public function f_EPTF_CLL_DataSource_Test_CheckGUIVariable_Manual_clientBehavior( in charstring pl_clientName,
|
| in EPTF_DataSource_CT pl_server)
|
| runs on EPTF_CLL_DataSource_Test_Client_CT
|
| {
|
| f_EPTF_Var_init_CT(pl_clientName);
|
| f_EPTF_DataSourceClient_init_CT(pl_clientName, pl_server);
|
| //f_EPTF_DataSourceClient_registerIterator(pl_dataProviderName, "", refers(f_EPTF_CLL_DataSource_preProcessor));
|
|
|
| var integer vl_idx;
|
| var EPTF_CharstringList vl_cList := {};
|
| f_EPTF_Var_newCharstring(c_EPTF_CLL_DataSource_Test_var_prefix & "ch1","Initvalue for charstring variable",vl_idx);
|
| vl_cList[sizeof(vl_cList)] := "ch1";
|
| f_EPTF_Var_newCharstring(c_EPTF_CLL_DataSource_Test_var_prefix & "ch2","Initvalue for charstring variable second",vl_idx);
|
| vl_cList[sizeof(vl_cList)] := "ch2";
|
|
|
| f_EPTF_Var_newFloat(c_EPTF_CLL_DataSource_Test_var_prefix & "fl1",3.14,vl_idx);
|
| vl_cList[sizeof(vl_cList)] := "fl1";
|
| f_EPTF_Var_newBool(c_EPTF_CLL_DataSource_Test_var_prefix & "bool1",true,vl_idx);
|
| vl_cList[sizeof(vl_cList)] := "bool1";
|
| f_EPTF_Var_newInt(c_EPTF_CLL_DataSource_Test_var_prefix & "int1",7890,vl_idx);
|
| vl_cList[sizeof(vl_cList)] := "int1";
|
|
|
| f_EPTF_Var_newCharstringlistRef(c_EPTF_CLL_DataSource_Test_var_prefix & "allVar", vl_cList ,vl_idx);
|
| vl_cList[sizeof(vl_cList)] := "allVar";
|
|
|
|
|
|
|
| f_EPTF_DataSourceClient_registerData("VarProvider", pl_clientName, refers(f_EPTF_CLL_DataSource_CheckGUIVariable_Manual_preProcessorData));
|
|
|
| t_periodicUpdate.start;
|
| activate(as_EPTF_CLL_DataSource_CheckGUIVariable_Manual_handleVarUpdates());
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
| private altstep as_EPTF_CLL_DataSource_CheckGUIVariable_Manual_handleVarUpdates() runs on EPTF_CLL_DataSource_Test_Client_CT {
|
| var integer vl_varIdx;
|
| var float vl_currentTime := f_EPTF_Base_getRelTimeInSecs();
|
| [] t_periodicUpdate.timeout {
|
| vl_varIdx := f_EPTF_Var_getId(c_EPTF_CLL_DataSource_Test_var_prefix & "ch1");
|
| f_EPTF_Var_adjustContent(vl_varIdx, {charstringVal := float2str(vl_currentTime)});
|
| vl_varIdx := f_EPTF_Var_getId(c_EPTF_CLL_DataSource_Test_var_prefix & "ch2");
|
| f_EPTF_Var_adjustContent(vl_varIdx, {charstringVal := int2str(float2int(vl_currentTime))});
|
| vl_varIdx := f_EPTF_Var_getId(c_EPTF_CLL_DataSource_Test_var_prefix & "fl1");
|
| f_EPTF_Var_adjustContent(vl_varIdx, {floatVal := vl_currentTime});
|
| vl_varIdx := f_EPTF_Var_getId(c_EPTF_CLL_DataSource_Test_var_prefix & "bool1");
|
| f_EPTF_Var_adjustContent(vl_varIdx, {boolVal := (float2int(vl_currentTime*1000.0) rem 2)==0});
|
| vl_varIdx := f_EPTF_Var_getId(c_EPTF_CLL_DataSource_Test_var_prefix & "int1");
|
| f_EPTF_Var_adjustContent(vl_varIdx, {intVal := float2int(vl_currentTime)});
|
| t_periodicUpdate.start;
|
| repeat;
|
| }
|
| }
|
|
|
| private function f_EPTF_CLL_DataSource_CheckGUIVariable_Manual_preProcessorData(
|
| out charstring pl_dataVarName,
|
| in charstring pl_source,
|
| in charstring pl_ptcName,
|
| in charstring pl_element,
|
| in EPTF_DataSource_Params pl_params
|
| ) runs on EPTF_CLL_DataSource_Test_Client_CT return integer {
|
|
|
| if (pl_source!="VarProvider") {
|
| return 1;
|
| }
|
| if (pl_element=="VarList") {
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "allVar";
|
| return 0;
|
| }
|
| if (pl_element=="VarValue") {
|
| if (sizeof(pl_params)!=1) {
|
| return 21;
|
| }
|
| if (-1 == f_EPTF_Var_getId(c_EPTF_CLL_DataSource_Test_var_prefix & pl_params[0].paramValue)) {
|
| return 22;
|
| }
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & pl_params[0].paramValue;
|
| return 0;
|
| }
|
| return 2;
|
| }
|
|
|
| public function f_EPTF_CLL_DataSource_dummy_DataSourceHandler(
|
| out charstring pl_dataVarName,
|
| in charstring pl_source,
|
| in charstring pl_ptcName,
|
| in charstring pl_element,
|
| in EPTF_DataSource_Params pl_params
|
| ) runs on EPTF_DataSourceClient_CT return integer {
|
|
|
| if (pl_source!="VarProvider") {
|
| return 1;
|
| }
|
| if (pl_element=="VarExists") {
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "yesVar";
|
| return 0;
|
| }
|
| if (pl_element=="VarDoesNotExist") {
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "NoVar";
|
| return 0;
|
| }
|
| if (pl_element=="VarValue") {
|
| var EPTF_CharstringList vl_needed := {"Param1", "Param2"};
|
| var EPTF_CharstringList vl_result;
|
| if (0 == f_EPTF_DataSource_getParams(pl_params,vl_needed,vl_result)) {
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "VarValue" &"."& vl_result[0] &"."& vl_result[1];
|
| return 0;
|
| }
|
| }
|
| return 2;
|
| }
|
| } //end of group
|
|
|
| group CheckDistributionChart {
|
|
|
| ///////////////////////////////////////////////////////////
|
| // Function: f_EPTF_CLL_DataSource_Test_CheckDistributionChart_Manual_clientBehavior
|
| //
|
| // Purpose:
|
| //
|
| // Parameters:
|
| //
|
| ///////////////////////////////////////////////////////////
|
| public function f_EPTF_CLL_DataSource_Test_CheckDistributionChart_Manual_clientBehavior( in charstring pl_clientName,
|
| in EPTF_DataSource_CT pl_server)
|
| runs on EPTF_CLL_DataSource_Test_Client_CT
|
| {
|
| f_EPTF_Var_init_CT(pl_clientName);
|
| f_EPTF_DataSourceClient_init_CT(pl_clientName, pl_server);
|
| //f_EPTF_DataSourceClient_registerIterator(pl_dataProviderName, "", refers(f_EPTF_CLL_DataSource_preProcessor));
|
|
|
| var integer vl_idx;
|
| f_EPTF_Var_newIntegerlist(c_EPTF_CLL_DataSource_Test_var_prefix & "iList1",{0,1,5,10,15,19,20,19,15,10,5,1,0,1,5,10,15,19,20,19,15,10,5,1,0},vl_idx);
|
|
|
|
|
|
|
| f_EPTF_DataSourceClient_registerData("CheckDistributionChart_Provider", "", refers(f_EPTF_CLL_DataSource_CheckDistributionChart_Manual_preProcessorData));
|
|
|
| t_periodicUpdate.start;
|
| activate(as_EPTF_CLL_DataSource_CheckDistributionChart_Manual_handleVarUpdates());
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
| private altstep as_EPTF_CLL_DataSource_CheckDistributionChart_Manual_handleVarUpdates() runs on EPTF_CLL_DataSource_Test_Client_CT {
|
| var integer vl_varIdx;
|
| var float vl_currentTime := f_EPTF_Base_getRelTimeInSecs();
|
| [] t_periodicUpdate.timeout {
|
| vl_varIdx := f_EPTF_Var_getId(c_EPTF_CLL_DataSource_Test_var_prefix & "iList1");
|
| var EPTF_IntegerList vl_currentValue;
|
| vl_currentValue := f_EPTF_Var_getIntegerlistValue(vl_varIdx);
|
| var EPTF_IntegerList vl_newValue;
|
| vl_newValue[0] := vl_currentValue[sizeof(vl_currentValue)-1];
|
| for(var integer i := 1; i < sizeof(vl_currentValue); i := i + 1) {
|
| vl_newValue[i] := vl_currentValue[ i - 1 ];
|
| }
|
| f_EPTF_Var_adjustContent(vl_varIdx, {integerlistVal := vl_newValue});
|
| t_periodicUpdate.start;
|
| repeat;
|
| }
|
| }
|
|
|
| private function f_EPTF_CLL_DataSource_CheckDistributionChart_Manual_preProcessorData(
|
| out charstring pl_dataVarName,
|
| in charstring pl_source,
|
| in charstring pl_ptcName,
|
| in charstring pl_element,
|
| in EPTF_DataSource_Params pl_params
|
| ) runs on EPTF_CLL_DataSource_Test_Client_CT return integer {
|
|
|
| if (pl_source!="CheckDistributionChart_Provider") {
|
| return 1;
|
| }
|
| if (pl_element != "Wave" and pl_params != {}) {
|
| return 2;
|
| }
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "iList1";
|
| return 0;
|
| }
|
| } // group CheckDistributionChart
|
|
|
| group CheckChart {
|
|
|
| ///////////////////////////////////////////////////////////
|
| // Function: f_EPTF_CLL_DataSource_Test_CheckChart_Manual_clientBehavior
|
| //
|
| // Purpose:
|
| //
|
| // Parameters:
|
| //
|
| ///////////////////////////////////////////////////////////
|
| public function f_EPTF_CLL_DataSource_Test_CheckChart_Manual_clientBehavior( in charstring pl_clientName,
|
| in EPTF_DataSource_CT pl_server)
|
| runs on EPTF_CLL_DataSource_Test_Client_CT
|
| {
|
| f_EPTF_Var_init_CT(pl_clientName);
|
| f_EPTF_DataSourceClient_init_CT(pl_clientName, pl_server);
|
| //f_EPTF_DataSourceClient_registerIterator(pl_dataProviderName, "", refers(f_EPTF_CLL_DataSource_preProcessor));
|
|
|
| var integer vl_idx;
|
| f_EPTF_Var_newFloat(c_EPTF_CLL_DataSource_Test_var_prefix & "trace1",0.1,vl_idx);
|
| f_EPTF_Var_newFloat(c_EPTF_CLL_DataSource_Test_var_prefix & "trace2",0.2,vl_idx);
|
|
|
|
|
|
|
| f_EPTF_DataSourceClient_registerData("CheckChart_Provider", "", refers(f_EPTF_CLL_DataSource_CheckChart_Manual_preProcessorData));
|
|
|
| timer t_wait:=2.0;
|
| t_wait.start; t_wait.timeout;
|
| t_periodicUpdate.start;
|
| activate(as_EPTF_CLL_DataSource_CheckChart_Manual_handleVarUpdates());
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
| private altstep as_EPTF_CLL_DataSource_CheckChart_Manual_handleVarUpdates() runs on EPTF_CLL_DataSource_Test_Client_CT {
|
| var integer vl_varIdx;
|
| var float vl_currentTime := f_EPTF_Base_getRelTimeInSecs();
|
| var float vl_currentValue;
|
| var float vl_newValue;
|
| [] t_periodicUpdate.timeout {
|
| vl_varIdx := f_EPTF_Var_getId(c_EPTF_CLL_DataSource_Test_var_prefix & "trace1");
|
| vl_currentValue := f_EPTF_Var_getFloatValue(vl_varIdx);
|
| vl_newValue := 4.0*vl_currentValue*(1.0-vl_currentValue);
|
| f_EPTF_Var_adjustContent(vl_varIdx, {floatVal := vl_newValue});
|
|
|
| // do not update second var => GUI should update even now
|
| // vl_varIdx := f_EPTF_Var_getId(c_EPTF_CLL_DataSource_Test_var_prefix & "trace2");
|
| // vl_currentValue := f_EPTF_Var_getFloatValue(vl_varIdx);
|
| // vl_newValue := 3.8*vl_currentValue*(1.0-vl_currentValue);
|
| // f_EPTF_Var_adjustContent(vl_varIdx, {floatVal := vl_newValue});
|
|
|
| t_periodicUpdate.start;
|
| repeat;
|
| }
|
| }
|
|
|
| private function f_EPTF_CLL_DataSource_CheckChart_Manual_preProcessorData(
|
| out charstring pl_dataVarName,
|
| in charstring pl_source,
|
| in charstring pl_ptcName,
|
| in charstring pl_element,
|
| in EPTF_DataSource_Params pl_params
|
| ) runs on EPTF_CLL_DataSource_Test_Client_CT return integer {
|
|
|
| if (pl_source!="CheckChart_Provider") {
|
| return 1;
|
| }
|
| if (pl_element != "ChartData" or sizeof(pl_params) != 1) {
|
| return 2;
|
| }
|
| if (pl_params[0].paramValue == "trace1") {
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "trace1";
|
| } else if (pl_params[0].paramValue == "trace2") {
|
| pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "trace2";
|
| } else {
|
| return 3;
|
| }
|
| return 0;
|
| }
|
| } // group CheckChart
|
|
|
|
|
| group EPTF_CLL_DataSource_Test {
|
|
|
| function f_EPTF_CLL_DataSource_test_DummySource(in charstring pl_ptcName := "") runs on EPTF_DataSource_CT {
|
| // Source: DummySource
|
|
|
| var charstring vl_dataVarName;
|
| var integer vl_errorCode := f_EPTF_DataSource_getData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "element1",
|
| pl_params := {
|
| {
|
| paramName := "P1",
|
| paramValue := "v1"
|
| },
|
| {
|
| paramName := "P1",
|
| paramValue := "v2"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be {"v1","v2"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(f_EPTF_Var_getId(vl_dataVarName) == -1) {
|
| setverdict(fail,"DataSource variable ",vl_dataVarName," is not found, but it should be there");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(f_EPTF_Var_getCharstringlistValue(f_EPTF_Var_getId(vl_dataVarName)) != {"v1","v2"}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| // checkData is called before getData:
|
| vl_errorCode := f_EPTF_DataSource_checkData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "element2",
|
| pl_params := {
|
| {
|
| paramName := "P21",
|
| paramValue := "v21"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v22"
|
| }
|
| }
|
| );
|
|
|
|
|
| // data should exist, and its value should be {"v21","v22"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| // // the variable should not exist:
|
| // if(f_EPTF_Var_getId(vl_dataVarName) != -1) {
|
| // setverdict(fail,"DataSource variable ",vl_dataVarName," is found, but it should not be there");
|
| // f_EPTF_Base_stopAll(none);
|
| // }
|
|
|
| vl_errorCode := f_EPTF_DataSource_getData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "element2",
|
| pl_params := {
|
| {
|
| paramName := "P21",
|
| paramValue := "v21"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v22"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be {"v21","v22"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(f_EPTF_Var_getId(vl_dataVarName) == -1) {
|
| setverdict(fail,"DataSource variable ",vl_dataVarName," is not found, but it should be there");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(f_EPTF_Var_getCharstringlistValue(f_EPTF_Var_getId(vl_dataVarName)) != {"v21","v22"}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
|
|
| }
|
|
|
| function f_EPTF_CLL_DataSource_test_DataSource(
|
| in charstring pl_ptcName := "",
|
| in EPTF_CharstringList vl_expectedSources := {},
|
| in charstring pl_checkPTCsForSource := "",
|
| in EPTF_CharstringList vl_expectedPTCs := {}
|
| ) runs on EPTF_DataSource_CT {
|
| var charstring vl_dataVarName;
|
| var integer vl_errorCode;
|
| // Source: DataSource
|
|
|
| vl_errorCode := f_EPTF_DataSource_getData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DataSource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "Sources",
|
| pl_params := {}
|
| );
|
|
|
| // data should exist, and its value should be {"DataSource","DummySource"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(f_EPTF_Var_getId(vl_dataVarName) == -1) {
|
| setverdict(fail,"DataSource variable ",vl_dataVarName," is not found, but it should be there");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(f_EPTF_Var_getCharstringlistValue(f_EPTF_Var_getId(vl_dataVarName)) != vl_expectedSources) {
|
| setverdict(fail,"The value of the DataSource variable is wrong: ", f_EPTF_Var_getCharstringlistValue(f_EPTF_Var_getId(vl_dataVarName)),
|
| "Expected: ", vl_expectedSources);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| // checkData is called before getData:
|
| vl_errorCode := f_EPTF_DataSource_checkData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DataSource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "PTCs",
|
| pl_params := {
|
| {
|
| paramName := "Source",
|
| paramValue := pl_checkPTCsForSource
|
| }
|
| }
|
| );
|
|
|
|
|
| // data should exist, and its value should be {"DataSourceClient_getData_Test"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| // the variable should exist:
|
| if(f_EPTF_Var_getId(vl_dataVarName) == -1) {
|
| setverdict(fail,"DataSource variable ",vl_dataVarName," is not found, but it should be there");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| vl_errorCode := f_EPTF_DataSource_getData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DataSource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "PTCs",
|
| pl_params := {
|
| {
|
| paramName := "Source",
|
| paramValue := pl_checkPTCsForSource
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be {"DataSourceClient_getData_Test"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(f_EPTF_Var_getId(vl_dataVarName) == -1) {
|
| setverdict(fail,"DataSource variable ",vl_dataVarName," is not found, but it should be there");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(f_EPTF_Var_getCharstringlistValue(f_EPTF_Var_getId(vl_dataVarName)) != vl_expectedPTCs) {
|
| setverdict(fail,"The value of the DataSource variable is wrong: ",f_EPTF_Var_getCharstringlistValue(f_EPTF_Var_getId(vl_dataVarName))," Expected: ", vl_expectedPTCs);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
|
|
| function f_EPTF_CLL_DataSource_test_checkData_DummySource(in charstring pl_ptcName) runs on EPTF_DataSource_CT {
|
| // Source: DummySource
|
|
|
| if (pl_ptcName=="") {
|
| setverdict(inconc,%definitionId&": PTC Name has to be specified");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| var charstring vl_dataVarName;
|
|
|
| // checkData is called before getData
|
| // PTCName: "", "":
|
| var integer vl_errorCode := f_EPTF_DataSource_checkData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DummySource",
|
| pl_ptcName := "",
|
| pl_element := "element2",
|
| pl_params := {
|
| {
|
| paramName := "P21",
|
| paramValue := "v21"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v22"
|
| }
|
| }
|
| );
|
|
|
|
|
| // data should exist, and its value should be {"v21","v22"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| // // the variable should not exist:
|
| // if(f_EPTF_Var_getId(vl_dataVarName) != -1) {
|
| // setverdict(fail,"DataSource variable ",vl_dataVarName," is found, but it should not be there");
|
| // f_EPTF_Base_stopAll(none);
|
| // }
|
|
|
| vl_errorCode := f_EPTF_DataSource_getData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DummySource",
|
| pl_ptcName := "",
|
| pl_element := "element2",
|
| pl_params := {
|
| {
|
| paramName := "P21",
|
| paramValue := "v21"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v22"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be {"v21","v22"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(f_EPTF_Var_getId(vl_dataVarName) == -1) {
|
| setverdict(fail,"DataSource variable ",vl_dataVarName," is not found, but it should be there");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(f_EPTF_Var_getCharstringlistValue(f_EPTF_Var_getId(vl_dataVarName)) != {"v21","v22"}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
|
|
| // checkData is called before getData
|
| // PTCName: pl_ptcName, "":
|
| vl_errorCode := f_EPTF_DataSource_checkData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "element3",
|
| pl_params := {
|
| {
|
| paramName := "P31",
|
| paramValue := "v31"
|
| },
|
| {
|
| paramName := "P31",
|
| paramValue := "v32"
|
| }
|
| }
|
| );
|
|
|
|
|
| // data should exist, and its value should be {"v31","v32"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| // // the variable should not exist:
|
| // if(f_EPTF_Var_getId(vl_dataVarName) != -1) {
|
| // setverdict(fail,"DataSource variable ",vl_dataVarName," is found, but it should not be there");
|
| // f_EPTF_Base_stopAll(none);
|
| // }
|
|
|
| vl_errorCode := f_EPTF_DataSource_getData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DummySource",
|
| pl_ptcName := "",
|
| pl_element := "element3",
|
| pl_params := {
|
| {
|
| paramName := "P31",
|
| paramValue := "v31"
|
| },
|
| {
|
| paramName := "P31",
|
| paramValue := "v32"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be {"v31","v32"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(f_EPTF_Var_getId(vl_dataVarName) == -1) {
|
| setverdict(fail,"DataSource variable ",vl_dataVarName," is not found, but it should be there");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(f_EPTF_Var_getCharstringlistValue(f_EPTF_Var_getId(vl_dataVarName)) != {"v31","v32"}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| // checkData is called before getData
|
| // PTCName: "", pl_ptcName:
|
| vl_errorCode := f_EPTF_DataSource_checkData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DummySource",
|
| pl_ptcName := "",
|
| pl_element := "element4",
|
| pl_params := {
|
| {
|
| paramName := "P41",
|
| paramValue := "v41"
|
| },
|
| {
|
| paramName := "P41",
|
| paramValue := "v42"
|
| }
|
| }
|
| );
|
|
|
|
|
| // data should exist, and its value should be {"v41","v42"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| // // the variable should not exist:
|
| // if(f_EPTF_Var_getId(vl_dataVarName) != -1) {
|
| // setverdict(fail,"DataSource variable ",vl_dataVarName," is found, but it should not be there");
|
| // f_EPTF_Base_stopAll(none);
|
| // }
|
|
|
| vl_errorCode := f_EPTF_DataSource_getData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "element4",
|
| pl_params := {
|
| {
|
| paramName := "P41",
|
| paramValue := "v41"
|
| },
|
| {
|
| paramName := "P41",
|
| paramValue := "v42"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be {"v41","v42"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(f_EPTF_Var_getId(vl_dataVarName) == -1) {
|
| setverdict(fail,"DataSource variable ",vl_dataVarName," is not found, but it should be there");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(f_EPTF_Var_getCharstringlistValue(f_EPTF_Var_getId(vl_dataVarName)) != {"v41","v42"}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| // checkData is called before getData
|
| // PTCName: pl_ptcName, pl_ptcName:
|
| vl_errorCode := f_EPTF_DataSource_checkData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "element5",
|
| pl_params := {
|
| {
|
| paramName := "P51",
|
| paramValue := "v51"
|
| },
|
| {
|
| paramName := "P51",
|
| paramValue := "v52"
|
| }
|
| }
|
| );
|
|
|
|
|
| // data should exist, and its value should be {"v51","v52"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| // // the variable should not exist:
|
| // if(f_EPTF_Var_getId(vl_dataVarName) != -1) {
|
| // setverdict(fail,"DataSource variable ",vl_dataVarName," is found, but it should not be there");
|
| // f_EPTF_Base_stopAll(none);
|
| // }
|
|
|
| vl_errorCode := f_EPTF_DataSource_getData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "element5",
|
| pl_params := {
|
| {
|
| paramName := "P51",
|
| paramValue := "v51"
|
| },
|
| {
|
| paramName := "P51",
|
| paramValue := "v52"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be {"v51","v52"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(f_EPTF_Var_getId(vl_dataVarName) == -1) {
|
| setverdict(fail,"DataSource variable ",vl_dataVarName," is not found, but it should be there");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(f_EPTF_Var_getCharstringlistValue(f_EPTF_Var_getId(vl_dataVarName)) != {"v51","v52"}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| }
|
|
|
| function f_EPTF_CLL_DataSource_test_DummySource_getDataValue(in charstring pl_ptcName := "") runs on EPTF_DataSource_CT {
|
| // Source: DummySource
|
|
|
| var EPTF_Var_DirectContent vl_dataValue;
|
| var integer vl_errorCode := f_EPTF_DataSource_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "dataelement1",
|
| pl_params := {
|
| {
|
| paramName := "P1",
|
| paramValue := "v1"
|
| },
|
| {
|
| paramName := "P1",
|
| paramValue := "v2"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be {"v1","v2"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue != {charstringlistVal := {"v1","v2"}}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
|
|
| vl_errorCode := f_EPTF_DataSource_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "dataelement2",
|
| pl_params := {
|
| {
|
| paramName := "P21",
|
| paramValue := "v21"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v22"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be {"v21","v22"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue != {charstringlistVal := {"v21","v22"}}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| //check invalid param:
|
| vl_errorCode := f_EPTF_DataSource_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "dataelement1",
|
| pl_params := {
|
| {
|
| paramName := "P1",
|
| paramValue := "v1"
|
| },
|
| {
|
| paramName := "P2",
|
| paramValue := "v2"
|
| },
|
| {
|
| paramName := "P3",
|
| paramValue := "v3"
|
| }
|
| }
|
| );
|
|
|
| // data should not exist
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. DataValue from DS: ", vl_dataValue);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| //check nonexistent source:
|
| vl_errorCode := f_EPTF_DataSource_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "NonExistentSource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "dataelement1",
|
| pl_params := {
|
| {
|
| paramName := "P1",
|
| paramValue := "v1"
|
| }
|
| }
|
| );
|
|
|
| // data should not exist
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. DataValue from DS: ", vl_dataValue);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| // check getValue for condition:
|
| vl_errorCode := f_EPTF_DataSource_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "isEqual",
|
| pl_params := {
|
| {
|
| paramName := "P21",
|
| paramValue := "v21"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v21"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be true
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue != {boolVal := true}) {
|
| setverdict(fail,"The value of the condition is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| // check getValue for condition:
|
| vl_errorCode := f_EPTF_DataSource_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "isEqual",
|
| pl_params := {
|
| {
|
| paramName := "P21",
|
| paramValue := "v21"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v22"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be false
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue != {boolVal := false}) {
|
| setverdict(fail,"The value of the condition is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| // check getValue for condition with invalid par:
|
| vl_errorCode := f_EPTF_DataSource_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "isEqual",
|
| pl_params := {
|
| {
|
| paramName := "P21",
|
| paramValue := "v21"
|
| },
|
| {
|
| paramName := "P22",
|
| paramValue := "v22"
|
| },
|
| {
|
| paramName := "P23",
|
| paramValue := "v23"
|
| }
|
| }
|
| );
|
|
|
| // data should not exist
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. DataValue from DS: ", vl_dataValue);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
|
|
| function f_EPTF_CLL_DataSource_test_DummySource_getDataValue_withValueHandler(in charstring pl_ptcName := "") runs on EPTF_DataSource_CT {
|
| // Source: DummySource
|
|
|
| var EPTF_Var_DirectContent vl_dataValue;
|
| var integer vl_errorCode := f_EPTF_DataSource_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "value_element1",
|
| pl_params := {
|
| {
|
| paramName := "P1",
|
| paramValue := "v1"
|
| },
|
| {
|
| paramName := "P1",
|
| paramValue := "v2"
|
| },
|
| {
|
| paramName := "P1",
|
| paramValue := "v3"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be {"v1","v2", "v3"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue != {charstringlistVal := {"v1","v2","v3"}}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
|
|
| vl_errorCode := f_EPTF_DataSource_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "value_element2",
|
| pl_params := {
|
| {
|
| paramName := "P21",
|
| paramValue := "v21"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v22"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v23"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be {"v21","v22","v23"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue != {charstringlistVal := {"v21","v22","v23"}}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| vl_errorCode := f_EPTF_DataSource_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "datavalue_element3",
|
| pl_params := {
|
| {
|
| paramName := "P21",
|
| paramValue := "v21"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v22"
|
| }
|
| }
|
| );
|
|
|
| // data should exist (returned by getData handler, getValueHandler returns error:invalid element), and its value should be {"v21","v22"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue != {charstringlistVal := {"v21","v22"}}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| vl_errorCode := f_EPTF_DataSource_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "dataelement3b",
|
| pl_params := {
|
| {
|
| paramName := "P21b",
|
| paramValue := "v21b"
|
| },
|
| {
|
| paramName := "P21b",
|
| paramValue := "v22b"
|
| }
|
| }
|
| );
|
|
|
| // data should exist (returned by getData handler, getValueHandler returns error:invalid element), and its value should be {"v21b","v22b"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue != {charstringlistVal := {"v21b","v22b"}}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| //check invalid param:
|
| vl_errorCode := f_EPTF_DataSource_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "value_element4",
|
| pl_params := {
|
| {
|
| paramName := "P1",
|
| paramValue := "v1"
|
| }
|
| }
|
| );
|
|
|
| // data should not exist
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. DataValue from DS: ", vl_dataValue);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| //check invalid param:
|
| vl_errorCode := f_EPTF_DataSource_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "dataelement5",
|
| pl_params := {
|
| {
|
| paramName := "P21",
|
| paramValue := "v1"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v22"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v23"
|
| }
|
| }
|
| );
|
|
|
| // data should not exist
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. DataValue from DS: ", vl_dataValue);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| //check invalid param:
|
| vl_errorCode := f_EPTF_DataSource_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "dataelement5",
|
| pl_params := {
|
| {
|
| paramName := "P21",
|
| paramValue := "v1"
|
| }
|
| }
|
| );
|
|
|
| // data should not exist
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. DataValue from DS: ", vl_dataValue);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| //check nonexistent source:
|
| vl_errorCode := f_EPTF_DataSource_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "NonExistentSource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "value_element1",
|
| pl_params := {
|
| {
|
| paramName := "P1",
|
| paramValue := "v1"
|
| }
|
| }
|
| );
|
|
|
| // data should not exist
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. DataValue from DS: ", vl_dataValue);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
|
|
| function f_EPTF_CLL_DataSource_test_DataSource_getDataValue(
|
| in charstring pl_ptcName := "",
|
| in EPTF_CharstringList vl_expectedSources := {},
|
| in charstring pl_checkPTCsForSource := "",
|
| in EPTF_CharstringList vl_expectedPTCs := {}
|
| ) runs on EPTF_DataSource_CT {
|
| var EPTF_Var_DirectContent vl_dataValue;
|
| var integer vl_errorCode;
|
| // Source: DataSource
|
|
|
| vl_errorCode := f_EPTF_DataSource_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DataSource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "Sources",
|
| pl_params := {}
|
| );
|
|
|
| // data should exist, and its value should be {"DataSource","DummySource"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue != {charstringlistVal := vl_expectedSources}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong: ", vl_dataValue,
|
| "Expected: ", vl_expectedSources);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| vl_errorCode := f_EPTF_DataSource_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DataSource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "PTCs",
|
| pl_params := {
|
| {
|
| paramName := "Source",
|
| paramValue := pl_checkPTCsForSource
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be {"DataSourceClient_getData_Test"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue != {charstringlistVal := vl_expectedPTCs}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong: ",vl_dataValue," Expected: ", vl_expectedPTCs);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
|
|
| //check nonexistent:
|
| vl_errorCode := f_EPTF_DataSource_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DataSource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "noSuchElement",
|
| pl_params := {
|
| {
|
| paramName := "P1",
|
| paramValue := "v1"
|
| }
|
| }
|
| );
|
|
|
| // data should not exist
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. DataValue from DS: ", vl_dataValue);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
|
|
| // check for conditions:
|
| vl_errorCode := f_EPTF_DataSource_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DataSource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "==",
|
| pl_params := {
|
| {
|
| paramName := "P1",
|
| paramValue := "v1"
|
| },
|
| {
|
| paramName := "P2",
|
| paramValue := "v1"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be true
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue != {boolVal := true}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong: ",vl_dataValue," Expected: ", vl_expectedPTCs);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| // check for conditions for false:
|
| vl_errorCode := f_EPTF_DataSource_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DataSource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "==",
|
| pl_params := {
|
| {
|
| paramName := "P1",
|
| paramValue := "v1"
|
| },
|
| {
|
| paramName := "P2",
|
| paramValue := "v2"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be false
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue != {boolVal := false}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong: ",vl_dataValue," Expected: ", vl_expectedPTCs);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| // check for conditions for invalid params:
|
| vl_errorCode := f_EPTF_DataSource_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DataSource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "==",
|
| pl_params := {
|
| {
|
| paramName := "P1",
|
| paramValue := "v1"
|
| },
|
| {
|
| paramName := "P2",
|
| paramValue := "v2"
|
| },
|
| {
|
| paramName := "P3",
|
| paramValue := "v3"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be false
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. DataValue from DS: ", vl_dataValue);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
|
|
| // set ------
|
|
|
| function f_EPTF_CLL_DataSource_test_DummySource_setDataValue(in charstring pl_ptcName := "") runs on EPTF_DataSource_CT {
|
| // Source: DummySource
|
|
|
| var EPTF_Var_DirectContent vl_dataValue := {charstringlistVal := {"a","b"}};
|
| var integer vl_errorCode := f_EPTF_DataSource_setDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "element1",
|
| pl_params := {
|
| {
|
| paramName := "P1",
|
| paramValue := "v1"
|
| },
|
| {
|
| paramName := "P1",
|
| paramValue := "v2"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be {"a","b"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue != {charstringlistVal := {"a","b"}}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
|
|
| vl_dataValue := {charstringlistVal :={"a","b"}};
|
| vl_errorCode := f_EPTF_DataSource_setDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "element2",
|
| pl_params := {
|
| {
|
| paramName := "P21",
|
| paramValue := "v21"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v22"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be {"a","b"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue != {charstringlistVal := {"a","b"}}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| //check invalid param:
|
| vl_dataValue := {charstringlistVal :={"a","b"}};
|
| vl_errorCode := f_EPTF_DataSource_setDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "element1",
|
| pl_params := {
|
| {
|
| paramName := "P1",
|
| paramValue := "v1"
|
| },
|
| {
|
| paramName := "P2",
|
| paramValue := "v2"
|
| },
|
| {
|
| paramName := "P3",
|
| paramValue := "v3"
|
| }
|
| }
|
| );
|
|
|
| // data should not exist
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. DataValue from DS: ", vl_dataValue);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| //check read-only:
|
| vl_dataValue := {charstringlistVal :={"a","b"}};
|
| vl_errorCode := f_EPTF_DataSource_setDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "element1",
|
| pl_params := {
|
| {
|
| paramName := "read-only",
|
| paramValue := "v1"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v22"
|
| }
|
| }
|
| );
|
|
|
| // data should be read-only
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should be read-only: 'element1'");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| //check nonexistent source:
|
| vl_dataValue := {charstringlistVal :={"a","b"}};
|
| vl_errorCode := f_EPTF_DataSource_setDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "NonExistentSource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "element1",
|
| pl_params := {
|
| {
|
| paramName := "P1",
|
| paramValue := "v1"
|
| }
|
| }
|
| );
|
|
|
| // data should not exist
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. DataValue from DS: ", vl_dataValue);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
|
|
| function f_EPTF_CLL_DataSource_test_DummySource_setDataValue_withValueHandler(in charstring pl_ptcName := "") runs on EPTF_DataSource_CT {
|
| // Source: DummySource
|
|
|
| var EPTF_Var_DirectContent vl_dataValue := {charstringlistVal :={"a","b"}};
|
| var integer vl_errorCode := f_EPTF_DataSource_setDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "value_element1",
|
| pl_params := {
|
| {
|
| paramName := "P1",
|
| paramValue := "v1"
|
| },
|
| {
|
| paramName := "P1",
|
| paramValue := "v2"
|
| },
|
| {
|
| paramName := "P1",
|
| paramValue := "v3"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be {"a","b"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue != {charstringlistVal := {"a","b"}}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
|
|
| vl_dataValue := {charstringlistVal :={"a","b"}};
|
| vl_errorCode := f_EPTF_DataSource_setDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "value_element2",
|
| pl_params := {
|
| {
|
| paramName := "P21",
|
| paramValue := "v21"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v22"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v23"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be {"a","b"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue != {charstringlistVal := {"a","b"}}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| vl_dataValue := {charstringlistVal :={"a","b"}};
|
| vl_errorCode := f_EPTF_DataSource_setDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "value_element3",
|
| pl_params := {
|
| {
|
| paramName := "P21",
|
| paramValue := "v21"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v22"
|
| }
|
| }
|
| );
|
|
|
| // data should exist (returned by getData handler, getValueHandler returns error:invalid param), and its value should be {"a","b"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue != {charstringlistVal := {"a","b"}}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| vl_dataValue := {charstringlistVal :={"a","b"}};
|
| vl_errorCode := f_EPTF_DataSource_setDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "element3b",
|
| pl_params := {
|
| {
|
| paramName := "P21b",
|
| paramValue := "v21b"
|
| },
|
| {
|
| paramName := "P21b",
|
| paramValue := "v22b"
|
| }
|
| }
|
| );
|
|
|
| // data should exist (returned by getData handler, getValueHandler returns error:invalid element), and its value should be {"a","b"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue != {charstringlistVal := {"a","b"}}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| //check invalid param:
|
| vl_dataValue := {charstringlistVal :={"a","b"}};
|
| vl_errorCode := f_EPTF_DataSource_setDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "value_element4",
|
| pl_params := {
|
| {
|
| paramName := "P1",
|
| paramValue := "v1"
|
| }
|
| }
|
| );
|
|
|
| // data should not exist
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. DataValue from DS: ", vl_dataValue);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| //check invalid param:
|
| vl_dataValue := {charstringlistVal :={"a","b"}};
|
| vl_errorCode := f_EPTF_DataSource_setDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "element5",
|
| pl_params := {
|
| {
|
| paramName := "P21",
|
| paramValue := "v1"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v22"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v23"
|
| }
|
| }
|
| );
|
|
|
| // data should not exist
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. DataValue from DS: ", vl_dataValue);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| //check invalid param:
|
| vl_dataValue := {charstringlistVal :={"a","b"}};
|
| vl_errorCode := f_EPTF_DataSource_setDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "element5",
|
| pl_params := {
|
| {
|
| paramName := "P21",
|
| paramValue := "v1"
|
| }
|
| }
|
| );
|
|
|
| // data should not exist
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. DataValue from DS: ", vl_dataValue);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| //check read-only:
|
| vl_dataValue := {charstringlistVal :={"a","b"}};
|
| vl_errorCode := f_EPTF_DataSource_setDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "element1",
|
| pl_params := {
|
| {
|
| paramName := "read-only",
|
| paramValue := "v1"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v22"
|
| }
|
| }
|
| );
|
|
|
| // data should be read-only
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should be read-only: 'element1'");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| // check read-only:
|
| vl_dataValue := {charstringlistVal :={"a","b"}};
|
| vl_errorCode := f_EPTF_DataSource_setDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "value_element2",
|
| pl_params := {
|
| {
|
| paramName := "read-only",
|
| paramValue := "v21"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v22"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v23"
|
| }
|
| }
|
| );
|
|
|
| // data should be read-only
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is not found, but it should be read-only: 'value_element2'");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| // check read-only:
|
| vl_dataValue := {charstringlistVal :={"a","b"}};
|
| vl_errorCode := f_EPTF_DataSource_setDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "value_element-2",
|
| pl_params := {
|
| {
|
| paramName := "read-only-2",
|
| paramValue := "v21"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v22"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v23"
|
| }
|
| }
|
| );
|
|
|
| // data should be read-only
|
| if (vl_errorCode!=2) {
|
| setverdict(fail,"Wrong error code for DataSource, it should be read-only: 'value_element-2'");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| //check nonexistent source:
|
| vl_dataValue := {charstringlistVal :={"a","b"}};
|
| vl_errorCode := f_EPTF_DataSource_setDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "NonExistentSource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "value_element1",
|
| pl_params := {
|
| {
|
| paramName := "P1",
|
| paramValue := "v1"
|
| }
|
| }
|
| );
|
|
|
| // data should not exist
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. DataValue from DS: ", vl_dataValue);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
|
|
| function f_EPTF_CLL_DataSource_test_DataSource_setDataValue(
|
| in charstring pl_ptcName := "",
|
| in EPTF_CharstringList vl_expectedSources := {},
|
| in charstring pl_checkPTCsForSource := "",
|
| in EPTF_CharstringList vl_expectedPTCs := {}
|
| ) runs on EPTF_DataSource_CT {
|
| var EPTF_Var_DirectContent vl_dataValue := {charstringlistVal := {"a","b"}};
|
| var integer vl_errorCode;
|
| // Source: DataSource
|
|
|
| vl_errorCode := f_EPTF_DataSource_setDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DataSource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "Sources",
|
| pl_params := {}
|
| );
|
|
|
| // data should exist, but it is read-only. Its value should be {"DataSource","DummySource"}
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource element 'Sources' should be read-only");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| vl_errorCode := f_EPTF_DataSource_setDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DataSource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "PTCs",
|
| pl_params := {
|
| {
|
| paramName := "Source",
|
| paramValue := pl_checkPTCsForSource
|
| }
|
| }
|
| );
|
|
|
| // data should exist, but it is read-only. its value should be {"DataSourceClient_getData_Test"}
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should be read-only.");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| //check nonexistent:
|
| vl_errorCode := f_EPTF_DataSource_setDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DataSource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "noSuchElement",
|
| pl_params := {
|
| {
|
| paramName := "P1",
|
| paramValue := "v1"
|
| }
|
| }
|
| );
|
|
|
| // data should not exist
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. DataValue from DS: ", vl_dataValue);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| }
|
|
|
| } //EPTF_CLL_DataSource_Test
|
|
|
|
|
| group EPTF_CLL_DataSourceClient_Test {
|
|
|
| function f_EPTF_DataSourceClient_behaviour2(
|
| in charstring pl_dataProviderName,
|
| in EPTF_DataSource_CT pl_dataSourceCompRef,
|
| in charstring pl_selfName := "EPTF_CLL_DataSourceClient_Test"
|
| ) runs on EPTF_CLL_DataSource_Client_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_dataSourceCompRef);
|
| f_EPTF_DataSourceClient_registerData(
|
| pl_source := pl_dataProviderName,
|
| pl_ptcName := f_EPTF_Base_selfName(),
|
| pl_dataHandler := refers(f_EPTF_DataSourceClient_CheckParamOrder_IteratorHandler)
|
| );
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
| function f_EPTF_DataSourceClient_behaviour_withGetData(
|
| in charstring pl_dataProviderName,
|
| in EPTF_DataSource_CT pl_dataSourceCompRef,
|
| in charstring pl_selfName := "EPTF_CLL_DataSourceClient_Test"
|
| ) runs on EPTF_CLL_DataSource_Client_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_dataSourceCompRef);
|
| f_EPTF_DataSourceClient_registerData(
|
| pl_source := pl_dataProviderName,
|
| pl_ptcName := f_EPTF_Base_selfName(),
|
| pl_dataHandler := refers(f_EPTF_DataSourceClient_CheckParamOrder_IteratorHandler)
|
| );
|
|
|
| timer t_wait := 2.0;
|
| // wait until other PTCs start
|
| t_wait.start; t_wait.timeout;
|
|
|
| f_EPTF_CLL_DataSourceClient_test_DummySource("DataSourceClient_getData_MorePTC_PTCWithGetData_Test");
|
| f_EPTF_CLL_DataSourceClient_test_DummySource("DS_Client_1");
|
| f_EPTF_CLL_DataSourceClient_test_DummySource(pl_selfName);
|
| f_EPTF_CLL_DataSourceClient_test_DataSource(
|
| -,
|
| {"DataSource", "DummySource", "Behav1", "LGenBase"},
|
| "DummySource",
|
| {"DataSourceClient_getData_MorePTC_PTCWithGetData_Test", "DS_Client_withGetData", "DS_Client_1"}
|
| );
|
|
|
| var integer vl_idx;
|
| f_EPTF_Var_newInt("Done.",1,vl_idx); // signal the end
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
|
|
| function f_EPTF_DataSourceClient_behaviour_withGetDataValue(
|
| in charstring pl_dataProviderName,
|
| in EPTF_DataSource_CT pl_dataSourceCompRef,
|
| in charstring pl_selfName := "EPTF_CLL_DataSourceClient_Test"
|
| ) runs on EPTF_CLL_DataSource_Client_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_dataSourceCompRef);
|
| f_EPTF_DataSourceClient_registerData(
|
| pl_source := pl_dataProviderName,
|
| pl_ptcName := f_EPTF_Base_selfName(),
|
| pl_dataHandler := refers(f_EPTF_DataSourceClient_CheckParamOrder_IteratorHandler)
|
| );
|
|
|
| timer t_wait := 2.0;
|
| // wait until other PTCs start
|
| t_wait.start; t_wait.timeout;
|
|
|
| f_EPTF_CLL_DataSourceClient_test_DummySource_getDataValue("DataSourceClient_getDataValue_MorePTC_PTCWithGetData_Test");
|
| f_EPTF_CLL_DataSourceClient_test_DummySource_getDataValue("DS_Client_1");
|
| f_EPTF_CLL_DataSourceClient_test_DummySource_getDataValue(pl_selfName);
|
| f_EPTF_CLL_DataSourceClient_test_DataSource_getDataValue(
|
| -,
|
| {"DataSource", "DummySource", "Behav1", "LGenBase"},
|
| "DummySource",
|
| {"DataSourceClient_getDataValue_MorePTC_PTCWithGetData_Test", "DS_Client_withGetData", "DS_Client_1"}
|
| );
|
|
|
| var integer vl_idx;
|
| f_EPTF_Var_newInt("Done.",1,vl_idx); // signal the end
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
|
|
| function f_EPTF_DataSourceClient_behaviour_withSetDataValue(
|
| in charstring pl_dataProviderName,
|
| in EPTF_DataSource_CT pl_dataSourceCompRef,
|
| in charstring pl_selfName := "EPTF_CLL_DataSourceClient_Test"
|
| ) runs on EPTF_CLL_DataSource_Client_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_dataSourceCompRef);
|
| f_EPTF_DataSourceClient_registerData(
|
| pl_source := pl_dataProviderName,
|
| pl_ptcName := f_EPTF_Base_selfName(),
|
| pl_dataHandler := refers(f_EPTF_DataSourceClient_CheckParamOrder_IteratorHandler)
|
| );
|
|
|
| timer t_wait := 2.0;
|
| // wait until other PTCs start
|
| t_wait.start; t_wait.timeout;
|
|
|
| f_EPTF_CLL_DataSourceClient_test_DummySource_setDataValue("DataSourceClient_setDataValue_MorePTC_PTCWithGetData_Test");
|
| f_EPTF_CLL_DataSourceClient_test_DummySource_setDataValue("DS_Client_1");
|
| f_EPTF_CLL_DataSourceClient_test_DummySource_setDataValue(pl_selfName);
|
|
|
| var integer vl_idx;
|
| f_EPTF_Var_newInt("Done.",1,vl_idx); // signal the end
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
|
|
| function f_EPTF_CLL_DataSourceClient_test_DummySource(in charstring pl_ptcName := "") runs on EPTF_DataSourceClient_CT {
|
| // Source: DummySource
|
|
|
| var charstring vl_dataVarName;
|
| var integer vl_errorCode := f_EPTF_DataSourceClient_getData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "element1",
|
| pl_params := {
|
| {
|
| paramName := "P1",
|
| paramValue := "v1"
|
| },
|
| {
|
| paramName := "P1",
|
| paramValue := "v2"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be {"v1","v2"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(f_EPTF_Var_getId(vl_dataVarName) == -1) {
|
| setverdict(fail,"DataSource variable ",vl_dataVarName," is not found, but it should be there");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(f_EPTF_Var_getCharstringlistValue(f_EPTF_Var_getId(vl_dataVarName)) != {"v1","v2"}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| // checkData is called before getData:
|
| vl_errorCode := f_EPTF_DataSourceClient_checkData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "element2",
|
| pl_params := {
|
| {
|
| paramName := "P21",
|
| paramValue := "v21"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v22"
|
| }
|
| }
|
| );
|
|
|
|
|
| // data should exist, and its value should be {"v21","v22"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| // // the variable should not exist:
|
| // if(f_EPTF_Var_getId(vl_dataVarName) != -1) {
|
| // setverdict(fail,"DataSource variable ",vl_dataVarName," is found, but it should not be there");
|
| // f_EPTF_Base_stopAll(none);
|
| // }
|
|
|
| vl_errorCode := f_EPTF_DataSourceClient_getData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "element2",
|
| pl_params := {
|
| {
|
| paramName := "P21",
|
| paramValue := "v21"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v22"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be {"v21","v22"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(f_EPTF_Var_getId(vl_dataVarName) == -1) {
|
| setverdict(fail,"DataSource variable ",vl_dataVarName," is not found, but it should be there");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(f_EPTF_Var_getCharstringlistValue(f_EPTF_Var_getId(vl_dataVarName)) != {"v21","v22"}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
|
|
| }
|
|
|
| function f_EPTF_CLL_DataSourceClient_test_DummySource_getDataValue(in charstring pl_ptcName := "") runs on EPTF_DataSourceClient_CT {
|
| // Source: DummySource
|
|
|
| var EPTF_Var_DirectContent vl_dataValue;
|
| var integer vl_errorCode := f_EPTF_DataSourceClient_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "element1",
|
| pl_params := {
|
| {
|
| paramName := "P1",
|
| paramValue := "v1"
|
| },
|
| {
|
| paramName := "P1",
|
| paramValue := "v2"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be {"v1","v2"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue != {charstringlistVal := {"v1","v2"}}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| vl_errorCode := f_EPTF_DataSourceClient_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "element2",
|
| pl_params := {
|
| {
|
| paramName := "P21",
|
| paramValue := "v21"
|
| },
|
| {
|
| paramName := "P21",
|
| paramValue := "v22"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be {"v21","v22"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue != {charstringlistVal := {"v21","v22"}}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
|
|
| function f_EPTF_CLL_DataSourceClient_test_DummySource_setDataValue(in charstring pl_ptcName := "") runs on EPTF_DataSourceClient_CT {
|
| // Source: DummySource
|
|
|
| var EPTF_Var_DirectContent vl_dataValueExpected;
|
| var EPTF_Var_DirectContent vl_dataValue;
|
| var integer vl_errorCode := f_EPTF_DataSourceClient_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "element1",
|
| pl_params := {
|
| {
|
| paramName := "P1",
|
| paramValue := "v1"
|
| },
|
| {
|
| paramName := "P1",
|
| paramValue := "v2"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be {"v1","v2"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue == {charstringlistVal := {"vv1","vv2", pl_ptcName}}) {
|
| setverdict(inconc,"The original value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| vl_dataValueExpected := {charstringlistVal := vl_dataValue.charstringlistVal & {"/", pl_ptcName}}
|
| vl_dataValue := vl_dataValueExpected;
|
| vl_errorCode := f_EPTF_DataSourceClient_setDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "element1",
|
| pl_params := {
|
| {
|
| paramName := "P1",
|
| paramValue := "v1"
|
| },
|
| {
|
| paramName := "P1",
|
| paramValue := "v2"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be vl_dataValueExpected
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue != vl_dataValueExpected) {
|
| setverdict(fail,"The value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| vl_errorCode := f_EPTF_DataSourceClient_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DummySource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "element1",
|
| pl_params := {
|
| {
|
| paramName := "P1",
|
| paramValue := "v1"
|
| },
|
| {
|
| paramName := "P1",
|
| paramValue := "v2"
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be vl_dataValueExpected
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue != vl_dataValueExpected) {
|
| setverdict(fail,"The value of the DataSource variable is wrong");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
|
|
| function f_EPTF_CLL_DataSourceClient_test_DataSource(
|
| in charstring pl_ptcName := "",
|
| in EPTF_CharstringList vl_expectedSources := {},
|
| in charstring pl_checkPTCsForSource := "",
|
| in EPTF_CharstringList vl_expectedPTCs := {}
|
| ) runs on EPTF_DataSourceClient_CT {
|
| var charstring vl_dataVarName;
|
| var integer vl_errorCode;
|
| // Source: DataSource
|
|
|
| vl_errorCode := f_EPTF_DataSourceClient_getData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DataSource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "Sources",
|
| pl_params := {}
|
| );
|
|
|
| // data should exist, and its value should be {"DataSource","DummySource"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(f_EPTF_Var_getId(vl_dataVarName) == -1) {
|
| setverdict(fail,"DataSource variable ",vl_dataVarName," is not found, but it should be there");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(f_EPTF_Var_getCharstringlistValue(f_EPTF_Var_getId(vl_dataVarName)) != vl_expectedSources) {
|
| setverdict(fail,"The value of the DataSource variable is wrong: ", f_EPTF_Var_getCharstringlistValue(f_EPTF_Var_getId(vl_dataVarName)),
|
| "Expected: ", vl_expectedSources);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| // checkData is called before getData:
|
| vl_errorCode := f_EPTF_DataSourceClient_checkData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DataSource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "PTCs",
|
| pl_params := {
|
| {
|
| paramName := "Source",
|
| paramValue := pl_checkPTCsForSource
|
| }
|
| }
|
| );
|
|
|
|
|
| // data should exist, and its value should be {"DataSourceClient_getData_Test"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| // // the variable should not exist:
|
| // if(f_EPTF_Var_getId(vl_dataVarName) != -1) {
|
| // setverdict(fail,"DataSource variable ",vl_dataVarName," is found, but it should not be there");
|
| // f_EPTF_Base_stopAll(none);
|
| // }
|
|
|
| vl_errorCode := f_EPTF_DataSourceClient_getData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DataSource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "PTCs",
|
| pl_params := {
|
| {
|
| paramName := "Source",
|
| paramValue := pl_checkPTCsForSource
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be {"DataSourceClient_getData_Test"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(f_EPTF_Var_getId(vl_dataVarName) == -1) {
|
| setverdict(fail,"DataSource variable ",vl_dataVarName," is not found, but it should be there");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(f_EPTF_Var_getCharstringlistValue(f_EPTF_Var_getId(vl_dataVarName)) != vl_expectedPTCs) {
|
| setverdict(fail,"The value of the DataSource variable is wrong: ",f_EPTF_Var_getCharstringlistValue(f_EPTF_Var_getId(vl_dataVarName))," Expected: ", vl_expectedPTCs);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
|
|
|
|
| function f_EPTF_CLL_DataSourceClient_test_DataSource_getDataValue(
|
| in charstring pl_ptcName := "",
|
| in EPTF_CharstringList vl_expectedSources := {},
|
| in charstring pl_checkPTCsForSource := "",
|
| in EPTF_CharstringList vl_expectedPTCs := {}
|
| ) runs on EPTF_DataSourceClient_CT {
|
| var EPTF_Var_DirectContent vl_dataValue;
|
| var integer vl_errorCode;
|
| // Source: DataSource
|
|
|
| vl_errorCode := f_EPTF_DataSourceClient_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DataSource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "Sources",
|
| pl_params := {}
|
| );
|
|
|
| // data should exist, and its value should be {"DataSource","DummySource"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue != {charstringlistVal := vl_expectedSources}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong: ", vl_dataValue,
|
| "Expected: ", vl_expectedSources);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| vl_errorCode := f_EPTF_DataSourceClient_getDataValue(
|
| pl_dataValue := vl_dataValue,
|
| pl_source := "DataSource",
|
| pl_ptcName := pl_ptcName,
|
| pl_element := "PTCs",
|
| pl_params := {
|
| {
|
| paramName := "Source",
|
| paramValue := pl_checkPTCsForSource
|
| }
|
| }
|
| );
|
|
|
| // data should exist, and its value should be {"DataSourceClient_getData_Test"}
|
| if (vl_errorCode!=0) {
|
| setverdict(fail,"DataSource is not found, but it should be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if(vl_dataValue != {charstringlistVal := vl_expectedPTCs}) {
|
| setverdict(fail,"The value of the DataSource variable is wrong: ",vl_dataValue," Expected: ", vl_expectedPTCs);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
|
|
| // negative tests:
|
|
|
| // functions and component that is needed to check expected warning messages
|
| group CheckExcpectedWarning {
|
|
|
| type component EPTF_CLL_DataSource_Test_ExpectedWarning_CT extends EPTF_UIHandler_CT {
|
| var boolean v_DataSource_Test_expectedWarningArrived := false;
|
| var charstring v_DataSource_Test_expectedWarningMsg:="";
|
| }
|
|
|
| function f_EPTF_DataSource_Test_ExpectedWarning_init() runs on EPTF_CLL_DataSource_Test_ExpectedWarning_CT {
|
| v_DataSource_Test_expectedWarningArrived := false;
|
| v_DataSource_Test_expectedWarningMsg:="";
|
| f_EPTF_Base_registerCleanup(refers(f_EPTF_DataSource_Test_ExpectedWarning_cleanup));
|
| f_EPTF_Logging_registerPreambleFn(refers(f_EPTF_DataSource_Test_ExpectedWarning_checkExpectedWarning_preamble_FT));
|
| }
|
|
|
| function f_EPTF_DataSource_Test_ExpectedWarning_cleanup() runs on EPTF_CLL_DataSource_Test_ExpectedWarning_CT {
|
| if (v_DataSource_Test_expectedWarningArrived) {
|
| setverdict(pass,"Expected warning message was logged");
|
| } else {
|
| setverdict(fail,"Expected warning message ",v_DataSource_Test_expectedWarningMsg," was not logged!");
|
| }
|
| }
|
|
|
| function f_EPTF_DataSource_Test_ExpectedWarning_setExpectedWarning(in charstring pl_expectedWarningMsg) runs on EPTF_CLL_DataSource_Test_ExpectedWarning_CT {
|
| v_DataSource_Test_expectedWarningMsg := pl_expectedWarningMsg;
|
| }
|
|
|
| function f_EPTF_DataSource_Test_ExpectedWarning_checkExpectedWarning_preamble_FT(in charstring pl_message) runs on EPTF_CLL_DataSource_Test_ExpectedWarning_CT {
|
| if (match(pl_message,pattern v_DataSource_Test_expectedWarningMsg)) {
|
| v_DataSource_Test_expectedWarningArrived := true;
|
| }
|
| }
|
|
|
| } // group CheckExcpectedWarning
|
|
|
|
|
| group DataSourceClient_CheckExcpectedWarning {
|
|
|
| type component EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT extends EPTF_CLL_DataSource_Test_ExpectedWarning_CT, EPTF_DataSourceClient_CT {
|
| }
|
|
|
| // checkNonExistentDataSource:
|
| function f_EPTF_CLL_DataSourceClient_test_checkNonExistentDataSource() runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT {
|
|
|
| f_EPTF_DataSource_Test_ExpectedWarning_setExpectedWarning("*Cannot get source component for dataSource *: Source is not registered*");
|
| var charstring vl_dataVarName;
|
| var integer vl_errorCode;
|
| // Source: DataSource
|
|
|
| vl_errorCode := f_EPTF_DataSourceClient_getData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "NonExistentSource",
|
| pl_ptcName := "",
|
| pl_element := "Sources",
|
| pl_params := {}
|
| );
|
|
|
| // data should exist, and its value should be {"DataSource","DummySource"}
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
|
|
| function f_EPTF_DataSourceClient_behaviour_checkNonExistentDataSource(
|
| in charstring pl_dataProviderName,
|
| in EPTF_DataSource_CT pl_dataSourceCompRef,
|
| in charstring pl_selfName := "EPTF_CLL_DataSourceClient_Test"
|
| ) runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_dataSourceCompRef);
|
| f_EPTF_DataSource_Test_ExpectedWarning_init();
|
| f_EPTF_DataSourceClient_registerData(
|
| pl_source := pl_dataProviderName,
|
| pl_ptcName := f_EPTF_Base_selfName(),
|
| pl_dataHandler := refers(f_EPTF_DataSourceClient_CheckParamOrder_IteratorHandler)
|
| );
|
|
|
| f_EPTF_CLL_DataSourceClient_test_checkNonExistentDataSource();
|
|
|
| var integer vl_idx;
|
| f_EPTF_Var_newInt("Done.",1,vl_idx); // signal the end
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
| // checkNonExistentDataSourceWithPTCName:
|
| function f_EPTF_CLL_DataSourceClient_test_checkNonExistentDataSourceWithPTCName() runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT {
|
|
|
| f_EPTF_DataSource_Test_ExpectedWarning_setExpectedWarning("*Cannot get source component for dataSource * and ptcName *: Source is not registered*");
|
| var charstring vl_dataVarName;
|
| var integer vl_errorCode;
|
| // Source: DataSource
|
|
|
| vl_errorCode := f_EPTF_DataSourceClient_getData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "NonExistentSource",
|
| pl_ptcName := "NonExistentPTC",
|
| pl_element := "Sources",
|
| pl_params := {}
|
| );
|
|
|
| // data should exist, and its value should be {"DataSource","DummySource"}
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
|
|
| function f_EPTF_DataSourceClient_behaviour_checkNonExistentDataSourceWithPTCName(
|
| in charstring pl_dataProviderName,
|
| in EPTF_DataSource_CT pl_dataSourceCompRef,
|
| in charstring pl_selfName := "EPTF_CLL_DataSourceClient_Test"
|
| ) runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_dataSourceCompRef);
|
| f_EPTF_DataSource_Test_ExpectedWarning_init();
|
| f_EPTF_DataSourceClient_registerData(
|
| pl_source := pl_dataProviderName,
|
| pl_ptcName := f_EPTF_Base_selfName(),
|
| pl_dataHandler := refers(f_EPTF_DataSourceClient_CheckParamOrder_IteratorHandler)
|
| );
|
|
|
| f_EPTF_CLL_DataSourceClient_test_checkNonExistentDataSourceWithPTCName();
|
|
|
| var integer vl_idx;
|
| f_EPTF_Var_newInt("Done.",1,vl_idx); // signal the end
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
| // checkNonExistentPTCName:
|
| function f_EPTF_CLL_DataSourceClient_test_checkNonExistentPTCName() runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT {
|
|
|
| f_EPTF_DataSource_Test_ExpectedWarning_setExpectedWarning("*Cannot get source component for dataSource * and ptcName ""NonExistentPTC"": Source with the given PTC name is not registered*");
|
| var charstring vl_dataVarName;
|
| var integer vl_errorCode;
|
| // Source: DataSource
|
|
|
| vl_errorCode := f_EPTF_DataSourceClient_getData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DummySource",
|
| pl_ptcName := "NonExistentPTC",
|
| pl_element := "Sources",
|
| pl_params := {}
|
| );
|
|
|
| // data should exist, and its value should be {"DataSource","DummySource"}
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
|
|
| function f_EPTF_DataSourceClient_behaviour_checkNonExistentPTCName(
|
| in charstring pl_dataProviderName,
|
| in EPTF_DataSource_CT pl_dataSourceCompRef,
|
| in charstring pl_selfName := "EPTF_CLL_DataSourceClient_Test"
|
| ) runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_dataSourceCompRef);
|
| f_EPTF_DataSource_Test_ExpectedWarning_init();
|
| f_EPTF_DataSourceClient_registerData(
|
| pl_source := pl_dataProviderName,
|
| pl_ptcName := f_EPTF_Base_selfName(),
|
| pl_dataHandler := refers(f_EPTF_DataSourceClient_CheckParamOrder_IteratorHandler)
|
| );
|
|
|
| f_EPTF_CLL_DataSourceClient_test_checkNonExistentPTCName();
|
|
|
| var integer vl_idx;
|
| f_EPTF_Var_newInt("Done.",1,vl_idx); // signal the end
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
| // checkWrongNumberOfParams:
|
| function f_EPTF_CLL_DataSourceClient_test_checkWrongNumberOfParams() runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT {
|
|
|
| f_EPTF_DataSource_Test_ExpectedWarning_setExpectedWarning("*Invalid iterator or externalData or parameter: *Source: *PTC : *Element Name : *Params: {*}*: Custom warning: *");
|
| var charstring vl_dataVarName;
|
| var integer vl_errorCode;
|
| // Source: DataSource
|
|
|
| vl_errorCode := f_EPTF_DataSourceClient_getData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DummySource",
|
| pl_ptcName := f_EPTF_Base_selfName(),
|
| pl_element := "Element",
|
| pl_params := {}
|
| );
|
|
|
| // data should exist, and its value should be {"DataSource","DummySource"}
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
|
|
| function f_EPTF_DataSourceClient_behaviour_checkWrongNumberOfParams(
|
| in charstring pl_dataProviderName,
|
| in EPTF_DataSource_CT pl_dataSourceCompRef,
|
| in charstring pl_selfName := "EPTF_CLL_DataSourceClient_Test"
|
| ) runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_dataSourceCompRef);
|
| f_EPTF_DataSource_Test_ExpectedWarning_init();
|
| f_EPTF_DataSourceClient_registerData(
|
| pl_source := pl_dataProviderName,
|
| pl_ptcName := f_EPTF_Base_selfName(),
|
| pl_dataHandler := refers(f_EPTF_DataSourceClient_CheckParamOrder_IteratorHandler)
|
| );
|
|
|
| f_EPTF_CLL_DataSourceClient_test_checkWrongNumberOfParams();
|
|
|
| var integer vl_idx;
|
| f_EPTF_Var_newInt("Done.",1,vl_idx); // signal the end
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
| // checkEmptyPTCNameWithMoreSources:
|
| function f_EPTF_CLL_DataSourceClient_test_checkEmptyPTCNameWithMoreSources() runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT {
|
|
|
| f_EPTF_DataSource_Test_ExpectedWarning_setExpectedWarning("* Cannot get data for dataSource * and ptcName """": More than one source component exists with this dataSource, PTC name should be specified*");
|
| var charstring vl_dataVarName;
|
| var integer vl_errorCode;
|
| // Source: DataSource
|
|
|
| vl_errorCode := f_EPTF_DataSourceClient_getData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DummySource",
|
| pl_ptcName := "",
|
| pl_element := "Element",
|
| pl_params := {}
|
| );
|
|
|
| // data should exist, and its value should be {"DataSource","DummySource"}
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
|
|
| function f_EPTF_DataSourceClient_behaviour_checkEmptyPTCNameWithMoreSources(
|
| in charstring pl_dataProviderName,
|
| in EPTF_DataSource_CT pl_dataSourceCompRef,
|
| in charstring pl_selfName := "EPTF_CLL_DataSourceClient_Test"
|
| ) runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_dataSourceCompRef);
|
| f_EPTF_DataSource_Test_ExpectedWarning_init();
|
| f_EPTF_DataSourceClient_registerData(
|
| pl_source := pl_dataProviderName,
|
| pl_ptcName := f_EPTF_Base_selfName(),
|
| pl_dataHandler := refers(f_EPTF_DataSourceClient_CheckParamOrder_IteratorHandler)
|
| );
|
|
|
| f_EPTF_CLL_DataSourceClient_test_checkEmptyPTCNameWithMoreSources();
|
|
|
| var integer vl_idx;
|
| f_EPTF_Var_newInt("Done.",1,vl_idx); // signal the end
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
| // CheckInternalDataElements_InvalidElement:
|
| function f_EPTF_CLL_DataSourceClient_test_CheckInternalDataElements_InvalidElement() runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT {
|
|
|
| f_EPTF_DataSource_Test_ExpectedWarning_setExpectedWarning("*f_EPTF_DataSource_handleBuiltInDataElements: Invalid dataElement for dataSource ""DataSource"": ""NonExistentElement"": Should be one of: { * }*");
|
| var charstring vl_dataVarName;
|
| var integer vl_errorCode;
|
| // Source: DataSource
|
|
|
| vl_errorCode := f_EPTF_DataSourceClient_getData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DataSource",
|
| pl_ptcName := "",
|
| pl_element := "NonExistentElement",
|
| pl_params := {}
|
| );
|
|
|
| // data should exist, and its value should be {"DataSource","DummySource"}
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
|
|
| function f_EPTF_DataSourceClient_behaviour_CheckInternalDataElements_InvalidElement(
|
| in charstring pl_dataProviderName,
|
| in EPTF_DataSource_CT pl_dataSourceCompRef,
|
| in charstring pl_selfName := "EPTF_CLL_DataSourceClient_Test"
|
| ) runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_dataSourceCompRef);
|
| f_EPTF_DataSource_Test_ExpectedWarning_init();
|
| f_EPTF_DataSourceClient_registerData(
|
| pl_source := pl_dataProviderName,
|
| pl_ptcName := f_EPTF_Base_selfName(),
|
| pl_dataHandler := refers(f_EPTF_DataSourceClient_CheckParamOrder_IteratorHandler)
|
| );
|
|
|
| f_EPTF_CLL_DataSourceClient_test_CheckInternalDataElements_InvalidElement();
|
|
|
| var integer vl_idx;
|
| f_EPTF_Var_newInt("Done.",1,vl_idx); // signal the end
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
| // CheckInternalDataElements_FewPars_PTCs:
|
| function f_EPTF_CLL_DataSourceClient_test_CheckInternalDataElements_FewPars_PTCs() runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT {
|
|
|
| f_EPTF_DataSource_Test_ExpectedWarning_setExpectedWarning("*f_EPTF_DataSource_handleBuiltInDataElements: Invalid number of parameters for dataSource ""DataSource"" and element ""PTCs"": Only one parameter has to be specified*");
|
| var charstring vl_dataVarName;
|
| var integer vl_errorCode;
|
| // Source: DataSource
|
|
|
| vl_errorCode := f_EPTF_DataSourceClient_getData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DataSource",
|
| pl_ptcName := "",
|
| pl_element := "PTCs",
|
| pl_params := {}
|
| );
|
|
|
| // data should exist, and its value should be {"DataSource","DummySource"}
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
|
|
| function f_EPTF_DataSourceClient_behaviour_CheckInternalDataElements_FewPars_PTCs(
|
| in charstring pl_dataProviderName,
|
| in EPTF_DataSource_CT pl_dataSourceCompRef,
|
| in charstring pl_selfName := "EPTF_CLL_DataSourceClient_Test"
|
| ) runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_dataSourceCompRef);
|
| f_EPTF_DataSource_Test_ExpectedWarning_init();
|
| f_EPTF_DataSourceClient_registerData(
|
| pl_source := pl_dataProviderName,
|
| pl_ptcName := f_EPTF_Base_selfName(),
|
| pl_dataHandler := refers(f_EPTF_DataSourceClient_CheckParamOrder_IteratorHandler)
|
| );
|
|
|
| f_EPTF_CLL_DataSourceClient_test_CheckInternalDataElements_FewPars_PTCs();
|
|
|
| var integer vl_idx;
|
| f_EPTF_Var_newInt("Done.",1,vl_idx); // signal the end
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
| // CheckInternalDataElements_ManyPars_PTCs:
|
| function f_EPTF_CLL_DataSourceClient_test_CheckInternalDataElements_ManyPars_PTCs() runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT {
|
|
|
| f_EPTF_DataSource_Test_ExpectedWarning_setExpectedWarning("*f_EPTF_DataSource_handleBuiltInDataElements: Invalid number of parameters for dataSource ""DataSource"" and element ""PTCs"": Only one parameter has to be specified*");
|
| var charstring vl_dataVarName;
|
| var integer vl_errorCode;
|
| // Source: DataSource
|
|
|
| vl_errorCode := f_EPTF_DataSourceClient_getData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DataSource",
|
| pl_ptcName := "",
|
| pl_element := "PTCs",
|
| pl_params := {}
|
| );
|
|
|
| // data should exist, and its value should be {"DataSource","DummySource"}
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
|
|
| function f_EPTF_DataSourceClient_behaviour_CheckInternalDataElements_ManyPars_PTCs(
|
| in charstring pl_dataProviderName,
|
| in EPTF_DataSource_CT pl_dataSourceCompRef,
|
| in charstring pl_selfName := "EPTF_CLL_DataSourceClient_Test"
|
| ) runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_dataSourceCompRef);
|
| f_EPTF_DataSource_Test_ExpectedWarning_init();
|
| f_EPTF_DataSourceClient_registerData(
|
| pl_source := pl_dataProviderName,
|
| pl_ptcName := f_EPTF_Base_selfName(),
|
| pl_dataHandler := refers(f_EPTF_DataSourceClient_CheckParamOrder_IteratorHandler)
|
| );
|
|
|
| f_EPTF_CLL_DataSourceClient_test_CheckInternalDataElements_ManyPars_PTCs();
|
|
|
| var integer vl_idx;
|
| f_EPTF_Var_newInt("Done.",1,vl_idx); // signal the end
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
| // CheckInternalDataElements_WrongParName_PTCs:
|
| function f_EPTF_CLL_DataSourceClient_test_CheckInternalDataElements_WrongParName_PTCs() runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT {
|
|
|
| f_EPTF_DataSource_Test_ExpectedWarning_setExpectedWarning("*f_EPTF_DataSource_handleBuiltInDataElements: Invalid name of parameter for dataSource ""DataSource"" and element ""PTCs"": The name of parameter should be ""Source""*");
|
| var charstring vl_dataVarName;
|
| var integer vl_errorCode;
|
| // Source: DataSource
|
|
|
| vl_errorCode := f_EPTF_DataSourceClient_getData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DataSource",
|
| pl_ptcName := "",
|
| pl_element := "PTCs",
|
| pl_params := {{paramName := "WrongParamName", paramValue:= "Value"}}
|
| );
|
|
|
| // data should exist, and its value should be {"DataSource","DummySource"}
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
|
|
| function f_EPTF_DataSourceClient_behaviour_CheckInternalDataElements_WrongParName_PTCs(
|
| in charstring pl_dataProviderName,
|
| in EPTF_DataSource_CT pl_dataSourceCompRef,
|
| in charstring pl_selfName := "EPTF_CLL_DataSourceClient_Test"
|
| ) runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_dataSourceCompRef);
|
| f_EPTF_DataSource_Test_ExpectedWarning_init();
|
| f_EPTF_DataSourceClient_registerData(
|
| pl_source := pl_dataProviderName,
|
| pl_ptcName := f_EPTF_Base_selfName(),
|
| pl_dataHandler := refers(f_EPTF_DataSourceClient_CheckParamOrder_IteratorHandler)
|
| );
|
|
|
| f_EPTF_CLL_DataSourceClient_test_CheckInternalDataElements_WrongParName_PTCs();
|
|
|
| var integer vl_idx;
|
| f_EPTF_Var_newInt("Done.",1,vl_idx); // signal the end
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
| // CheckInternalDataElements_ManyPars_Sources:
|
| function f_EPTF_CLL_DataSourceClient_test_CheckInternalDataElements_ManyPars_Sources() runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT {
|
|
|
| f_EPTF_DataSource_Test_ExpectedWarning_setExpectedWarning("*f_EPTF_DataSource_handleBuiltInDataElements: Invalid number of parameters for dataSource ""DataSource"" and element ""Sources"": No parameter has to be specified*");
|
| var charstring vl_dataVarName;
|
| var integer vl_errorCode;
|
| // Source: DataSource
|
|
|
| vl_errorCode := f_EPTF_DataSourceClient_getData(
|
| pl_dataVarName := vl_dataVarName,
|
| pl_source := "DataSource",
|
| pl_ptcName := "",
|
| pl_element := "Sources",
|
| pl_params := {
|
| {paramName := "Source", paramValue:= "Value"},
|
| {paramName := "Source", paramValue:= "Value"}
|
| }
|
| );
|
|
|
| // data should exist, and its value should be {"DataSource","DummySource"}
|
| if (vl_errorCode==0) {
|
| setverdict(fail,"DataSource is found, but it should not be there. Error code from DS: ", vl_errorCode);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
|
|
| function f_EPTF_DataSourceClient_behaviour_CheckInternalDataElements_ManyPars_Sources(
|
| in charstring pl_dataProviderName,
|
| in EPTF_DataSource_CT pl_dataSourceCompRef,
|
| in charstring pl_selfName := "EPTF_CLL_DataSourceClient_Test"
|
| ) runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_dataSourceCompRef);
|
| f_EPTF_DataSource_Test_ExpectedWarning_init();
|
| f_EPTF_DataSourceClient_registerData(
|
| pl_source := pl_dataProviderName,
|
| pl_ptcName := f_EPTF_Base_selfName(),
|
| pl_dataHandler := refers(f_EPTF_DataSourceClient_CheckParamOrder_IteratorHandler)
|
| );
|
|
|
| f_EPTF_CLL_DataSourceClient_test_CheckInternalDataElements_ManyPars_Sources();
|
|
|
| var integer vl_idx;
|
| f_EPTF_Var_newInt("Done.",1,vl_idx); // signal the end
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
|
|
| public altstep as_runGetData() runs on EPTF_CLL_DataSource_Source_CT {
|
| var charstring vl_dataVarName;
|
| [] t_altwait.timeout {
|
| var float vl_time := f_EPTF_Base_getRelTimeInSecs();
|
| if(vl_time < 5.0){
|
| t_altwait.start(0.5);
|
| }
|
| action("GetData start: ",vl_time);
|
| f_EPTF_DataSource_getData(vl_dataVarName,
|
| pl_source := "DummySource",
|
| pl_ptcName := "DataSourceClient_getData_MorePTC_PTCWithSameGetData_Test",
|
| pl_element := "geza",
|
| pl_params := {{"a","b"},{"c","d"}}
|
| );
|
| action("GetData end: ",vl_time)
|
| repeat;
|
| }
|
| }
|
|
|
| function f_EPTF_DataSourceTest_Service(
|
| out charstring pl_dataVarName,
|
| in charstring pl_dataSource,
|
| in charstring pl_ptcName,
|
| in charstring pl_dataElement,
|
| in EPTF_DataSource_Params pl_params
|
| ) runs on EPTF_DataSourceClient_CT return integer {
|
| timer t_wait := 5.0;
|
| // wait until other PTCs start
|
| t_wait.start; t_wait.timeout;
|
| if (sizeof(pl_params)!=2) {
|
| pl_dataVarName := log2str(%definitionId&": Custom warning: Wrong number of params for DataSource "&pl_dataSource);
|
| return 1; // invalid number of params
|
| }
|
| pl_dataVarName := "IteratorVarName"&pl_dataElement&log2str(pl_params);
|
| var integer vl_varIdx;
|
| //create iterator var if not exist for test
|
| if (f_EPTF_Var_getId(pl_dataVarName)==-1) {
|
| f_EPTF_Var_newCharstringlist(pl_dataVarName,{pl_params[0].paramValue,pl_params[1].paramValue},vl_varIdx);
|
| }
|
| return 0;
|
| }
|
|
|
| } // group DataSourceClient_CheckExcpectedWarning
|
|
|
|
|
| group NonBlockingGetData {
|
|
|
| function f_EPTF_DataSource_Test_getData_nonBlocking_getDataHandler(
|
| //request parameters:
|
| in charstring pl_source,
|
| in charstring pl_ptcName, // response may fill this if it was ""
|
| in charstring pl_element,
|
| in EPTF_DataSource_Params pl_params,
|
| // reponse parameters:
|
| in integer pl_errorCode, // error code in the response
|
| in charstring pl_remoteDataVarName, // var name on the remote component
|
| in EPTF_Var_CT/*EPTF_DataSourceClient_CT*/ pl_ownerCompRef,// reference to the remote component
|
| in integer vl_localDataVarId, // var id on the local component (contains the current value, not subscribed to remote!)
|
| in EPTF_Var_DirectContent pl_dataValue, // the value of the data
|
| // user data
|
| in EPTF_IntegerList pl_userData // user specific data given at the request
|
| ) runs on EPTF_Var_CT {
|
| //pl_userData[0] should be the same as sizeof(pl_params)
|
| //pl_userData[1]: if specified and it is -1: it means negative test, pl_errorCode should be nonzero.
|
| var boolean vl_negativeTest := sizeof(pl_userData)>1 and pl_userData[1]==-1;
|
|
|
| action("MyHandler called with: ",
|
| " pl_source: ", pl_source,
|
| ", pl_ptcName: ", pl_ptcName, // response may fill this if it was ""
|
| ", pl_element: ", pl_element,
|
| ", pl_params: ", pl_params,
|
| // reponse parameters:
|
| ", pl_errorCode: ", pl_errorCode, // error code in the response
|
| ", pl_remoteDataVarName: ", pl_remoteDataVarName, // var name on the remote component
|
| ", pl_ownerCompRef: ", pl_ownerCompRef,// reference to the remote component
|
| ", vl_localDataVarId: ", vl_localDataVarId, // var id on the local component (contains the current value, not subscribed to remote!)
|
| ", pl_dataValue: ", pl_dataValue, // the value of the data
|
| // user data
|
| ", pl_userData: ", pl_userData // user specific data given at the request
|
| );
|
|
|
| if (vl_negativeTest) {
|
| if (pl_errorCode==0) {
|
| f_EPTF_Logging_error(true,"It is a negative test, but GetData was successful");
|
| f_EPTF_Base_stopAll(fail);
|
| }
|
| } else {
|
|
|
| if (vl_localDataVarId==-1) {
|
| setverdict(fail,"Local data source variable does not exist with id: ",vl_localDataVarId);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| var EPTF_Var_DirectContent vl_currentContent;
|
| f_EPTF_Var_getContent(vl_localDataVarId,vl_currentContent);
|
| if(vl_currentContent!=pl_dataValue) {
|
| setverdict(fail,"The value ",vl_currentContent," of the local data source variable does match with the value given in the handler: ",pl_dataValue);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| if (sizeof(pl_userData) < 1) {
|
| setverdict(fail,"The value ",pl_userData," is incorrect: It should have at least one element.");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| var integer vl_nofParams := pl_userData[0];
|
| if (vl_nofParams != sizeof(pl_params)) {
|
| setverdict(fail,"The 0-th value of userData is ",pl_userData[0]," It is incorrect: It should be the same as the size of pl_params: ",sizeof(pl_params));
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| if (pl_errorCode!=0) {
|
| f_EPTF_Logging_error(true,log2str("GetData returned an error: ",vl_localDataVarId));
|
| f_EPTF_Base_stopAll(fail);
|
| }
|
| }
|
| setverdict(pass, "Parameters in the handler are valid");
|
| }
|
|
|
| function f_EPTF_CLL_DataSourceClient_Test_getData_nonBlocking(in charstring pl_selfName, in EPTF_DataSource_CT pl_sourceCompRef) runs on EPTF_CLL_DataSource_Client_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_sourceCompRef);
|
|
|
| f_EPTF_DataSourceClient_getData_nonBlocking(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName,
|
| pl_params := {{"paramX", "valueX"}, {"paramA", "valueA"}}, // they are not in lexical order!
|
| pl_getDataHandler := {refers(f_EPTF_DataSource_Test_getData_nonBlocking_getDataHandler),{2}}
|
| );
|
|
|
| f_EPTF_DataSourceClient_getData_nonBlocking(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2,
|
| pl_params := {},
|
| pl_getDataHandler := {refers(f_EPTF_DataSource_Test_getData_nonBlocking_getDataHandler),{0}}
|
| );
|
|
|
| //dataSource dataElement:
|
| f_EPTF_DataSourceClient_getData_nonBlocking(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_DataSource_dataElement_Sources,
|
| pl_params := {},
|
| pl_getDataHandler := {refers(f_EPTF_DataSource_Test_getData_nonBlocking_getDataHandler),{0}}
|
| );
|
|
|
| // check the checkData function:
|
| var charstring vl_dataVarName_check;
|
| var integer vl_errorCode := f_EPTF_DataSourceClient_checkData(
|
| pl_dataVarName := vl_dataVarName_check,
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName,
|
| pl_params := {{"paramX", "valueX"}, {"paramA", "valueA"}}
|
| );
|
|
|
| if (vl_errorCode!=0) {
|
| setverdict(fail, "CheckData returned an error: ",vl_errorCode)
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| // check data for datalement2"
|
| var charstring vl_dataVarName2_check;
|
| vl_errorCode := f_EPTF_DataSourceClient_checkData(
|
| pl_dataVarName := vl_dataVarName2_check,
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2,
|
| pl_params := {}
|
| );
|
|
|
| if (vl_errorCode!=0) {
|
| setverdict(fail, "CheckData returned an error: ",vl_errorCode)
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
|
|
| // checkNonExistentDataSource:
|
| function f_EPTF_CLL_DataSourceClient_test_checkNonExistentDataSource_nonBlocking() runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT {
|
|
|
| f_EPTF_DataSource_Test_ExpectedWarning_setExpectedWarning("*Cannot get source component for dataSource *: Source is not registered*");
|
| var charstring vl_dataVarName;
|
| var integer vl_errorCode;
|
| // Source: DataSource
|
|
|
| vl_errorCode := f_EPTF_DataSourceClient_getData_nonBlocking(
|
| pl_source := "NonExistentSource",
|
| pl_ptcName := "",
|
| pl_element := "Sources",
|
| pl_params := {},
|
| pl_getDataHandler := {refers(f_EPTF_DataSource_Test_getData_nonBlocking_getDataHandler),{0,-1}}
|
| );
|
|
|
| }
|
|
|
| function f_EPTF_DataSourceClient_behaviour_checkNonExistentDataSource_nonBlocking(
|
| in charstring pl_dataProviderName,
|
| in EPTF_DataSource_CT pl_dataSourceCompRef,
|
| in charstring pl_selfName := "EPTF_CLL_DataSourceClient_Test"
|
| ) runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_dataSourceCompRef);
|
| f_EPTF_DataSource_Test_ExpectedWarning_init();
|
| f_EPTF_DataSourceClient_registerData(
|
| pl_source := pl_dataProviderName,
|
| pl_ptcName := f_EPTF_Base_selfName(),
|
| pl_dataHandler := refers(f_EPTF_DataSourceClient_CheckParamOrder_IteratorHandler)
|
| );
|
|
|
| f_EPTF_CLL_DataSourceClient_test_checkNonExistentDataSource_nonBlocking();
|
|
|
| var integer vl_idx;
|
| f_EPTF_Var_newInt("Done.",1,vl_idx); // signal the end
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
|
|
| }//group NonBlockingGetData
|
|
|
| group NonBlockingGetDataValue {
|
|
|
| type component EPTF_CLL_DataSourceClient_Test_ExpectedWarning_NonBlocking_CT extends EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT, EPTF_CLL_DataSourceClient_Test_NonBlocking_CT {
|
| }
|
|
|
|
|
| function f_EPTF_DataSource_Test_getDataValue_nonBlocking_getDataHandler(
|
| // reponse parameters:
|
| in integer pl_errorCode, // error code in the response
|
| in EPTF_Var_DirectContent pl_dataValue, // the value of the data
|
| // user data
|
| in EPTF_IntegerList pl_userData // user specific data given at the request
|
| ) runs on EPTF_CLL_Test_NonBlocking_CT {
|
| //pl_userData[0] should be the same as sizeof(pl_params)
|
| //pl_userData[1]: if specified and it is -1: it means negative test, pl_errorCode should be nonzero.
|
| //pl_userData[2]: this number is the index of the testcase, it is the index of the global list variables
|
| var boolean vl_negativeTest := sizeof(pl_userData)>1 and pl_userData[1]==-1;
|
|
|
| var integer vl_test_index := pl_userData[2];
|
| var charstring vl_source := v_Test_NonBlocking_ReqList[vl_test_index].source;
|
| var charstring vl_ptcName := v_Test_NonBlocking_ReqList[vl_test_index].ptcName;
|
| var charstring vl_element := v_Test_NonBlocking_ReqList[vl_test_index].element;
|
| var EPTF_DataSource_Params vl_params := v_Test_NonBlocking_ReqList[vl_test_index].params;
|
|
|
| action("MyValueHandler called with: ",
|
| " pl_source: ", vl_source,
|
| ", pl_ptcName: ", vl_ptcName, // response may fill this if it was ""
|
| ", pl_element: ", vl_element,
|
| ", pl_params: ", vl_params,
|
| // reponse parameters:
|
| ", pl_errorCode: ", pl_errorCode, // error code in the response
|
| ", pl_dataValue: ", pl_dataValue, // the value of the data
|
| // user data
|
| ", pl_userData: ", pl_userData // user specific data given at the request
|
| );
|
|
|
| if (vl_negativeTest) {
|
| if (pl_errorCode==0) {
|
| f_EPTF_Logging_error(true,"It is a negative test, but GetData was successful");
|
| f_EPTF_Base_stopAll(fail);
|
| }
|
| } else {
|
|
|
| if (sizeof(pl_userData) < 1) {
|
| setverdict(fail,"The value ",pl_userData," is incorrect: It should have at least one element.");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| var integer vl_nofParams := pl_userData[0];
|
| if (vl_nofParams != sizeof(vl_params)) {
|
| setverdict(fail,"The 0-th value of userData is ",pl_userData[0]," It is incorrect: It should be the same as the size of pl_params: ",sizeof(vl_params));
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| if (pl_errorCode!=0) {
|
| var charstring vl_errMsg := "";
|
| if (ischosen(pl_dataValue.charstringVal)) {
|
| vl_errMsg := pl_dataValue.charstringVal;
|
| }
|
| f_EPTF_Logging_error(true,log2str("GetData returned an error: ", vl_errMsg));
|
| f_EPTF_Base_stopAll(fail);
|
| }
|
| }
|
| setverdict(pass, "Parameters in the handler are valid");
|
| }
|
|
|
| function f_EPTF_CLL_DataSourceClient_Test_getDataValue_nonBlocking(in charstring pl_selfName, in EPTF_DataSource_CT pl_sourceCompRef) runs on EPTF_CLL_DataSourceClient_Test_NonBlocking_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_sourceCompRef);
|
|
|
| v_Test_NonBlocking_ReqList[0] := {
|
| source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| ptcName := "",
|
| element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName,
|
| method := "",
|
| params := {{"paramX", "valueX"}, {"paramA", "valueA"}},
|
| indexList := {}
|
| };
|
|
|
| f_EPTF_DataSourceClient_getDataValue_nonBlocking(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName,
|
| pl_params := {{"paramX", "valueX"}, {"paramA", "valueA"}}, // they are not in lexical order!
|
| pl_getDataValueHandler := {refers(f_EPTF_DataSource_Test_getDataValue_nonBlocking_getDataHandler),{2, 0, 0}}
|
| );
|
|
|
| v_Test_NonBlocking_ReqList[1] := {
|
| source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| ptcName := "",
|
| element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2,
|
| method := "",
|
| params := {},
|
| indexList := {}
|
| };
|
|
|
| f_EPTF_DataSourceClient_getDataValue_nonBlocking(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2,
|
| pl_params := {},
|
| pl_getDataValueHandler := {refers(f_EPTF_DataSource_Test_getDataValue_nonBlocking_getDataHandler),{0, 0, 1}}
|
| );
|
|
|
| v_Test_NonBlocking_ReqList[2] := {
|
| source := c_EPTF_DataSource_sourceId,
|
| ptcName := "",
|
| element := c_EPTF_DataSource_dataElement_Sources,
|
| method := "",
|
| params := {},
|
| indexList := {}
|
| };
|
|
|
| //dataSource dataElement:
|
| f_EPTF_DataSourceClient_getDataValue_nonBlocking(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_DataSource_dataElement_Sources,
|
| pl_params := {},
|
| pl_getDataValueHandler := {refers(f_EPTF_DataSource_Test_getDataValue_nonBlocking_getDataHandler),{0, 0, 2}}
|
| );
|
|
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
|
|
| // checkNonExistentDataSource:
|
| function f_EPTF_CLL_DataSourceClient_test_checkNonExistentDataSource_getDataValue_nonBlocking() runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_NonBlocking_CT {
|
|
|
| f_EPTF_DataSource_Test_ExpectedWarning_setExpectedWarning("*Cannot get source component for dataSource *: Source is not registered*");
|
| var charstring vl_dataVarName;
|
| var integer vl_errorCode;
|
| // Source: DataSource
|
|
|
| v_Test_NonBlocking_ReqList[0] := {
|
| source := "NonExistentSource",
|
| ptcName := "",
|
| element := "Sources",
|
| method := "",
|
| params := {},
|
| indexList := {}
|
| };
|
|
|
| vl_errorCode := f_EPTF_DataSourceClient_getDataValue_nonBlocking(
|
| pl_source := "NonExistentSource",
|
| pl_ptcName := "",
|
| pl_element := "Sources",
|
| pl_params := {},
|
| pl_getDataValueHandler := {refers(f_EPTF_DataSource_Test_getDataValue_nonBlocking_getDataHandler),{0,-1, 0}}
|
| );
|
|
|
| }
|
|
|
| function f_EPTF_DataSourceClient_behaviour_checkNonExistentDataSource_getDataValue_nonBlocking(
|
| in charstring pl_dataProviderName,
|
| in EPTF_DataSource_CT pl_dataSourceCompRef,
|
| in charstring pl_selfName := "EPTF_CLL_DataSourceClient_Test"
|
| ) runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_NonBlocking_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_dataSourceCompRef);
|
| f_EPTF_DataSource_Test_ExpectedWarning_init();
|
| f_EPTF_DataSourceClient_registerData(
|
| pl_source := pl_dataProviderName,
|
| pl_ptcName := f_EPTF_Base_selfName(),
|
| pl_dataHandler := refers(f_EPTF_DataSourceClient_CheckParamOrder_IteratorHandler)
|
| );
|
|
|
| f_EPTF_CLL_DataSourceClient_test_checkNonExistentDataSource_getDataValue_nonBlocking();
|
|
|
| var integer vl_idx;
|
| f_EPTF_Var_newInt("Done.",1,vl_idx); // signal the end
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
|
|
| }//group NonBlockingGetDataValue
|
|
|
| group NonBlockingSetDataValue {
|
|
|
| function f_EPTF_DataSource_Test_setDataValue_nonBlocking_getDataHandler(
|
| // reponse parameters:
|
| in integer pl_errorCode, // error code in the response
|
| in EPTF_Var_DirectContent pl_dataValue, // the value of the data
|
| // user data
|
| in EPTF_IntegerList pl_userData // user specific data given at the request
|
| ) runs on EPTF_CLL_Test_NonBlocking_CT {
|
| //pl_userData[0] should be the same as sizeof(pl_params)
|
| //pl_userData[1]: if specified and it is -1: it means negative test, pl_errorCode should be nonzero.
|
| //pl_userData[2]: this number is the index of the testcase, it is the index of the global list variables
|
| var boolean vl_negativeTest := sizeof(pl_userData)>1 and pl_userData[1]==-1;
|
|
|
| var integer vl_test_index := pl_userData[2];
|
| var charstring vl_source := v_Test_NonBlocking_ReqList[vl_test_index].source;
|
| var charstring vl_ptcName := v_Test_NonBlocking_ReqList[vl_test_index].ptcName;
|
| var charstring vl_element := v_Test_NonBlocking_ReqList[vl_test_index].element;
|
| var EPTF_DataSource_Params vl_params := v_Test_NonBlocking_ReqList[vl_test_index].params;
|
|
|
| action("MySetValueHandler called with: ",
|
| " pl_source: ", vl_source,
|
| ", pl_ptcName: ", vl_ptcName, // response may fill this if it was ""
|
| ", pl_element: ", vl_element,
|
| ", pl_params: ", vl_params,
|
| // reponse parameters:
|
| ", pl_errorCode: ", pl_errorCode, // error code in the response
|
| ", pl_dataValue: ", pl_dataValue, // the value of the data
|
| // user data
|
| ", pl_userData: ", pl_userData // user specific data given at the request
|
| );
|
|
|
| var integer vl_nofParams := pl_userData[0];
|
| if (vl_negativeTest) {
|
| if (pl_errorCode==0) {
|
| f_EPTF_Logging_error(true,"It is a negative test, but GetData was successful");
|
| f_EPTF_Base_stopAll(fail);
|
| }
|
| } else {
|
|
|
| if (sizeof(pl_userData) < 1) {
|
| setverdict(fail,"The value ",pl_userData," is incorrect: It should have at least one element.");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if (vl_nofParams != sizeof(vl_params)) {
|
| setverdict(fail,"The 0-th value of userData is ",pl_userData[0]," It is incorrect: It should be the same as the size of pl_params: ",sizeof(vl_params));
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| if (pl_errorCode!=0) {
|
| var charstring vl_errMsg := "";
|
| if (ischosen(pl_dataValue.charstringVal)) {
|
| vl_errMsg := pl_dataValue.charstringVal;
|
| }
|
| f_EPTF_Logging_error(true,log2str("GetData returned an error: ", vl_errMsg));
|
| f_EPTF_Base_stopAll(fail);
|
| }
|
| }
|
|
|
| // second param is the reference var name:
|
| if (vl_nofParams==2) {
|
| var charstring vl_varName := log2str(pl_userData[1]);
|
| var EPTF_Var_DirectContent vl_referenceValue;
|
| f_EPTF_Var_getContent(f_EPTF_Var_getId(vl_varName),vl_referenceValue);
|
| if (pl_dataValue != vl_referenceValue) {
|
| setverdict(fail, "The returned value is incorrect: ", pl_dataValue, " should be: ", vl_referenceValue)
|
| }
|
| }
|
|
|
| setverdict(pass, "Parameters in the handler are valid");
|
| }
|
|
|
| function f_EPTF_CLL_DataSourceClient_Test_setDataValue_nonBlocking(in charstring pl_selfName, in EPTF_DataSource_CT pl_sourceCompRef) runs on EPTF_CLL_DataSourceClient_Test_NonBlocking_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_sourceCompRef);
|
|
|
| var EPTF_Var_DirectContent vl_newContent;
|
| f_EPTF_DataSourceClient_getDataValue(
|
| pl_dataValue := vl_newContent,
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName,
|
| pl_params := {{"paramX", "valueX"}, {"paramA", "valueA"}} // they are not in lexical order!
|
| );
|
|
|
| var integer vl_referenceVarIdx;
|
| vl_newContent := {intVal := 1};
|
| vl_referenceVarIdx := f_EPTF_Var_newVar("1",vl_newContent);
|
| vl_newContent := {intVal := 2};
|
| vl_referenceVarIdx := f_EPTF_Var_newVar("2",vl_newContent);
|
|
|
| vl_newContent := {intVal := 1};
|
| v_Test_NonBlocking_ReqList[0] := {
|
| source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| ptcName := "",
|
| element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName,
|
| method := "",
|
| params := {{"paramX", "valueX"}, {"paramA", "valueA"}},
|
| indexList := {}
|
| };
|
| f_EPTF_DataSourceClient_setDataValue_nonBlocking(
|
| pl_dataValue := vl_newContent,
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName,
|
| pl_params := {{"paramX", "valueX"}, {"paramA", "valueA"}}, // they are not in lexical order!
|
| pl_getDataValueHandler := {refers(f_EPTF_DataSource_Test_setDataValue_nonBlocking_getDataHandler),{2,1,0}}
|
| );
|
|
|
| v_Test_NonBlocking_ReqList[1] := {
|
| source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| ptcName := "",
|
| element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2,
|
| method := "",
|
| params := {},
|
| indexList := {}
|
| };
|
| vl_newContent := {intVal := 2};
|
| f_EPTF_DataSourceClient_setDataValue_nonBlocking(
|
| pl_dataValue := vl_newContent,
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2,
|
| pl_params := {},
|
| pl_getDataValueHandler := {refers(f_EPTF_DataSource_Test_setDataValue_nonBlocking_getDataHandler),{0,2,1}}
|
| );
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
| // checkNonExistentDataSource:
|
| function f_EPTF_CLL_DataSourceClient_test_checkNonExistentDataSource_setDataValue_nonBlocking() runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_NonBlocking_CT {
|
|
|
| f_EPTF_DataSource_Test_ExpectedWarning_setExpectedWarning("*Cannot get source component for dataSource *: Source is not registered*");
|
| var charstring vl_dataVarName;
|
| var integer vl_errorCode;
|
| // Source: DataSource
|
|
|
| var EPTF_Var_DirectContent vl_newContent;
|
| vl_newContent := {charstringlistVal := {"a", "b"}};
|
|
|
| v_Test_NonBlocking_ReqList[0] := {
|
| source := "NonExistentSource",
|
| ptcName := "",
|
| element := "Sources",
|
| method := "",
|
| params := {},
|
| indexList := {}
|
| };
|
|
|
| vl_errorCode := f_EPTF_DataSourceClient_setDataValue_nonBlocking(
|
| pl_dataValue := vl_newContent,
|
| pl_source := "NonExistentSource",
|
| pl_ptcName := "",
|
| pl_element := "Sources",
|
| pl_params := {},
|
| pl_getDataValueHandler := {refers(f_EPTF_DataSource_Test_setDataValue_nonBlocking_getDataHandler),{0,-1, 0}}
|
| );
|
|
|
| }
|
|
|
| function f_EPTF_DataSourceClient_behaviour_checkNonExistentDataSource_setDataValue_nonBlocking(
|
| in charstring pl_dataProviderName,
|
| in EPTF_DataSource_CT pl_dataSourceCompRef,
|
| in charstring pl_selfName := "EPTF_CLL_DataSourceClient_Test"
|
| ) runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_NonBlocking_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_dataSourceCompRef);
|
| f_EPTF_DataSource_Test_ExpectedWarning_init();
|
| f_EPTF_DataSourceClient_registerData(
|
| pl_source := pl_dataProviderName,
|
| pl_ptcName := f_EPTF_Base_selfName(),
|
| pl_dataHandler := refers(f_EPTF_DataSourceClient_CheckParamOrder_IteratorHandler)
|
| );
|
|
|
| f_EPTF_CLL_DataSourceClient_test_checkNonExistentDataSource_setDataValue_nonBlocking();
|
|
|
| var integer vl_idx;
|
| f_EPTF_Var_newInt("Done.",1,vl_idx); // signal the end
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
| }//group NonBlockingSetDataValue
|
|
|
| group NonBlockingTests{
|
| /* This function is a common handler for nonBlocking function tests
|
| */
|
| function f_EPTF_DataSource_Test_NonBlocking_handlerCheck(
|
| in charstring pl_source,
|
| in charstring pl_ptcName, // response may fill this if it was ""
|
| in charstring pl_element,
|
| in EPTF_DataSource_Params pl_params,
|
| // reponse parameters:
|
| in integer pl_errorCode, // error code in the response
|
| in charstring pl_remoteDataVarName, // var name on the remote component
|
| in EPTF_Var_CT/*EPTF_DataSourceClient_CT*/ pl_ownerCompRef,// reference to the remote component
|
| in integer pl_localDataVarId, // var id on the local component (contains the current value, not subscribed to remote!)
|
| in EPTF_Var_DirectContent pl_dataValue, // the value of the data
|
| // user data
|
| in EPTF_IntegerList pl_userData // user specific data given at the request
|
| ) runs on EPTF_CLL_Test_NonBlocking_CT {
|
|
|
| //check if pl_userData param contains all information
|
| if (sizeof(pl_userData) < c_Test_NonBlocking_UserData_Index_TestIndex + 1) {
|
| setverdict(fail, "Not enough parameters in calling f_EPTF_DataSource_Test_NonBlocking_handlerCheck");
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| //set params from userData
|
| var integer vl_test_index := pl_userData[c_Test_NonBlocking_UserData_Index_TestIndex];
|
| var EPTF_Var_DirectContent expectedValue := v_Test_NonBlocking_expectedValueList[vl_test_index];
|
| var boolean vl_expectedNotSet := expectedValue == c_Test_NonBlocking_UserData_ExpectedValue_NOT_SET;
|
| var boolean vl_negativeTest := pl_userData[c_Test_NonBlocking_UserData_Index_Positive] == c_Test_NonBlocking_Negative;
|
| var boolean vl_nonBlockingTest := pl_userData[c_Test_NonBlocking_UserData_Index_NonBlockingEffect] == c_Test_NonBlocking_With_NonBlocking_Effect;
|
| var charstring vl_testDescription := v_Test_NonBlocking_testDescriptionList[vl_test_index];
|
| var charstring vl_errorLog := log2str(" Test index: ", vl_test_index, ". Test description: ", vl_testDescription);
|
|
|
| action("MyHandler called with: ",
|
| " pl_source: ", pl_source,
|
| ", pl_ptcName: ", pl_ptcName, // response may fill this if it was ""
|
| ", pl_element: ", pl_element,
|
| ", pl_params: ", pl_params,
|
| // reponse parameters:
|
| ", pl_errorCode: ", pl_errorCode, // error code in the response
|
| ", pl_remoteDataVarName: ", pl_remoteDataVarName, // var name on the remote component
|
| ", pl_ownerCompRef: ", pl_ownerCompRef,// reference to the remote component
|
| ", vl_localDataVarId: ", pl_localDataVarId, // var id on the local component (contains the current value, not subscribed to remote!)
|
| ", pl_dataValue: ", pl_dataValue, // the value of the data
|
| // user data
|
| ", pl_userData: ", pl_userData // user specific data given at the request
|
| );
|
|
|
| v_Test_NonBlocking_handlerCalled[vl_test_index] := true;
|
|
|
| //check given data
|
| if (vl_negativeTest) {
|
| if (pl_errorCode == 0) {
|
| setverdict(fail, "It is a negative test, but GetData was successful.", vl_errorLog);
|
| f_EPTF_Base_stopAll(fail);
|
| }
|
| if (not vl_expectedNotSet) {
|
| setverdict(fail,"Expected value should be 'c_Test_NonBlocking_UserData_ExpectedValue_NOT_SET'. Current value: ", pl_dataValue.boolVal,
|
| ". Value can not be tested in negative test mode. ", vl_errorLog);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| } else {
|
| //check error code
|
| if (pl_errorCode != 0) {
|
| setverdict(fail , "Tested function returned an error: ", pl_errorCode, ".", vl_errorLog);
|
| f_EPTF_Base_stopAll(fail);
|
| }
|
| //check return value
|
| if (not vl_expectedNotSet and expectedValue != pl_dataValue) {
|
| setverdict(fail , "Tested function return value shuld be: ", expectedValue, ". Function return value is: ", pl_dataValue, ".", vl_errorLog);
|
| f_EPTF_Base_stopAll(fail);
|
| }
|
| }
|
|
|
| //check nonBlocking variables
|
| if (vl_nonBlockingTest) {
|
| if (not isbound(v_Test_NonBlocking_listCalled[vl_test_index])) {
|
| setverdict(fail,"Non-blocking mode does not work. Code is blocked.", vl_errorLog);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| } else {
|
| if (isbound(v_Test_NonBlocking_listCalled[vl_test_index])) {
|
| setverdict(fail,"Non-blocking mode does not work correctly. Handler should be called instantly.", vl_errorLog);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
| }
|
|
|
| /*
|
| This function is to override DataSource f_EPTF_DataSourceClient_nonBlocking functions in order to set user data array from the given parameters
|
| */
|
| function f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| in charstring pl_source,
|
| in charstring pl_ptcName := "",
|
| in charstring pl_element := "",
|
| in charstring pl_method := "",
|
| in EPTF_DataSource_Params pl_params := {},
|
| in EPTF_DataSource_Filter pl_filter := c_EPTF_DataSource_Filter_empty,
|
| in EPTF_IntegerList pl_indexList := {},
|
| in EPTF_Var_DirectContent pl_ValueToSet := c_Test_NonBlocking_NOTHING_TO_SET,
|
| in EPTF_CLL_DataSource_Test_NonBlocking_Handler pl_handler,
|
| in integer pl_positiveTest,
|
| in EPTF_Var_DirectContent pl_expectedValue := c_Test_NonBlocking_UserData_ExpectedValue_NOT_SET,
|
| in integer pl_callable_func,
|
| in integer pl_nonBlockingEffect,
|
| in charstring pl_testDescription := ""
|
| ) runs on EPTF_CLL_DataSource_Test_NonBlocking_CT {
|
|
|
| var integer vl_test_index := sizeof(v_Test_NonBlocking_listCalled);
|
|
|
| var EPTF_IntegerList vl_userData := f_EPTF_DataSource_Test_NonBlocking_prepare(
|
| pl_source,
|
| pl_ptcName,
|
| pl_element,
|
| pl_method,
|
| pl_params,
|
| pl_positiveTest,
|
| pl_nonBlockingEffect,
|
| pl_expectedValue,
|
| pl_ValueToSet,
|
| pl_indexList,
|
| pl_testDescription,
|
| vl_test_index
|
| );
|
|
|
| // call the origin function with the given params
|
| select(pl_callable_func) {
|
| case(c_Test_NonBlocking_Callable_Function_getCondition) {
|
| f_EPTF_DataSource_getCondition_nonBlocking(
|
| pl_source := pl_source,
|
| pl_ptcName := pl_ptcName,
|
| pl_method := pl_method,
|
| pl_params := pl_params,
|
| pl_getConditionHandler := {pl_handler.dataHandler, vl_userData}
|
| );
|
| }
|
| case(c_Test_NonBlocking_Callable_Function_checkData) {
|
| f_EPTF_DataSource_checkData_nonblocking(
|
| pl_source := pl_source,
|
| pl_ptcName := pl_ptcName,
|
| pl_element := pl_element,
|
| pl_params := pl_params,
|
| pl_checkDataHandler := {pl_handler.dataHandler, vl_userData}
|
| );
|
| }
|
| case(c_Test_NonBlocking_Callable_Function_getDataValue) {
|
| f_EPTF_DataSource_getDataValue_nonblocking(
|
| pl_source := pl_source,
|
| pl_ptcName := pl_ptcName,
|
| pl_element := pl_element,
|
| pl_params := pl_params,
|
| pl_filter := pl_filter,
|
| pl_getDataValueHandler := {pl_handler.dataValueHandler, vl_userData}
|
| );
|
| }
|
| case(c_Test_NonBlocking_Callable_Function_setDataValue) {
|
| f_EPTF_DataSource_setDataValue_nonblocking(
|
| pl_dataValue := pl_ValueToSet,
|
| pl_source := pl_source,
|
| pl_ptcName := pl_ptcName,
|
| pl_element := pl_element,
|
| pl_params := pl_params,
|
| pl_indexList := pl_indexList,
|
| pl_setDataValueHandler := {pl_handler.dataValueHandler, vl_userData}
|
| );
|
| }
|
| }
|
|
|
| //set nonBlocking test variables
|
| f_EPTF_DataSource_Test_NonBlocking_set_blocking_variable(vl_test_index);
|
| }
|
|
|
| /*
|
| This function is tp override DataSourceClient f_EPTF_DataSourceClient_nonBlocking functions in order to set user data array from the given parameters
|
| */
|
| function f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| in charstring pl_source,
|
| in charstring pl_ptcName := "",
|
| in charstring pl_element := "",
|
| in charstring pl_method := "",
|
| in EPTF_DataSource_Params pl_params := {},
|
| in EPTF_IntegerList pl_indexList := {},
|
| in EPTF_Var_DirectContent pl_ValueToSet := c_Test_NonBlocking_NOTHING_TO_SET,
|
| in EPTF_CLL_DataSource_Test_NonBlocking_Handler pl_handler,
|
| in integer pl_positiveTest,
|
| in EPTF_Var_DirectContent pl_expectedValue := c_Test_NonBlocking_UserData_ExpectedValue_NOT_SET,
|
| in integer pl_callable_func,
|
| in integer pl_nonBlockingEffect,
|
| in charstring pl_testDescription := ""
|
| ) runs on EPTF_CLL_DataSourceClient_Test_NonBlocking_CT {
|
|
|
| var integer vl_test_index := sizeof(v_Test_NonBlocking_listCalled);
|
|
|
| //create dataHandler
|
| var EPTF_IntegerList vl_userData := f_EPTF_DataSource_Test_NonBlocking_prepare(
|
| pl_source,
|
| pl_ptcName,
|
| pl_element,
|
| pl_method,
|
| pl_params,
|
| pl_positiveTest,
|
| pl_nonBlockingEffect,
|
| pl_expectedValue,
|
| pl_ValueToSet,
|
| pl_indexList,
|
| pl_testDescription,
|
| vl_test_index
|
| );
|
|
|
| // call the origin function with the given params
|
| if (pl_callable_func == c_Test_NonBlocking_Callable_Function_getConditionClient) {
|
| f_EPTF_DataSourceClient_getCondition_nonBlocking(
|
| pl_source := pl_source,
|
| pl_ptcName := pl_ptcName,
|
| pl_method := pl_method,
|
| pl_params := pl_params,
|
| pl_getConditionHandler := {pl_handler.dataHandler, vl_userData}
|
| );
|
| }
|
|
|
| //set nonBlocking test variables
|
| f_EPTF_DataSource_Test_NonBlocking_set_blocking_variable(vl_test_index);
|
| }
|
|
|
| function f_EPTF_DataSource_Test_NonBlocking_prepare(
|
| in charstring pl_source,
|
| in charstring pl_ptcName,
|
| in charstring pl_element,
|
| in charstring pl_method,
|
| in EPTF_DataSource_Params pl_params,
|
| in integer pl_positiveTest,
|
| in integer pl_nonBlockingEffect,
|
| in EPTF_Var_DirectContent pl_expectedValue,
|
| in EPTF_Var_DirectContent pl_valueToSet,
|
| in EPTF_IntegerList pl_indexList,
|
| in charstring pl_testDescription,
|
| in integer pl_test_index
|
| )
|
| runs on EPTF_CLL_Test_NonBlocking_CT
|
| return EPTF_IntegerList {
|
|
|
| v_Test_NonBlocking_ReqList[pl_test_index] := {
|
| source := pl_source,
|
| ptcName := pl_ptcName,
|
| element := pl_element,
|
| method := pl_method,
|
| params := pl_params,
|
| indexList := pl_indexList
|
| };
|
|
|
| v_Test_NonBlocking_expectedValueList[pl_test_index] := pl_expectedValue;
|
| v_Test_NonBlocking_valueToSetList[pl_test_index] := pl_valueToSet;
|
| v_Test_NonBlocking_testDescriptionList[pl_test_index] := pl_testDescription;
|
|
|
| var EPTF_IntegerList vl_userData := {};
|
| vl_userData[c_Test_NonBlocking_UserData_Index_Positive] := pl_positiveTest;
|
| vl_userData[c_Test_NonBlocking_UserData_Index_NonBlockingEffect] := pl_nonBlockingEffect;
|
| vl_userData[c_Test_NonBlocking_UserData_Index_TestIndex] := pl_test_index;
|
|
|
| return vl_userData;
|
| }
|
|
|
| //set the blocking variable
|
| function f_EPTF_DataSource_Test_NonBlocking_set_blocking_variable(
|
| in integer pl_test_index
|
| )
|
| runs on EPTF_CLL_Test_NonBlocking_CT {
|
| // set the test variable
|
| // this param will be check in the handler
|
| v_Test_NonBlocking_listCalled[pl_test_index] := true;
|
| }
|
|
|
| function f_EPTF_DataSource_Test_NonBlocking_finish()
|
| runs on EPTF_CLL_Test_NonBlocking_CT {
|
| if (sizeof(v_Test_NonBlocking_listCalled) != sizeof(v_Test_NonBlocking_handlerCalled)) {
|
| setverdict(fail, "Called function and called handler function number are not equal. Called function: ", v_Test_NonBlocking_listCalled, " Called handler: ", v_Test_NonBlocking_handlerCalled);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| for (var integer vl_i := 0; vl_i < sizeof(v_Test_NonBlocking_handlerCalled); vl_i := vl_i + 1) {
|
| if (not isbound(v_Test_NonBlocking_handlerCalled[vl_i])) {
|
| setverdict(fail, "Function called, but handler do not. Test description: ", v_Test_NonBlocking_testDescriptionList[vl_i]);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
| }
|
|
|
| group NonBlockingCheckData{
|
|
|
| //This function is to handle data in checkData handler function
|
| function f_EPTF_DataSourceTest_NonBlocking_check_getDataHandler(
|
| in charstring pl_source,
|
| in charstring pl_ptcName, // response may fill this if it was ""
|
| in charstring pl_element,
|
| in EPTF_DataSource_Params pl_params,
|
| // reponse parameters:
|
| in integer pl_errorCode, // error code in the response
|
| in charstring pl_remoteDataVarName, // var name on the remote component
|
| in EPTF_Var_CT/*EPTF_DataSourceClient_CT*/ pl_ownerCompRef,// reference to the remote component
|
| in integer pl_localDataVarId, // var id on the local component (contains the current value, not subscribed to remote!)
|
| in EPTF_Var_DirectContent pl_dataValue, // the value of the data
|
| // user data
|
| in EPTF_IntegerList pl_userData // user specific data given at the request
|
| ) runs on EPTF_CLL_Test_NonBlocking_CT {
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_handlerCheck(
|
| pl_source,
|
| pl_ptcName,
|
| pl_element,
|
| pl_params,
|
| pl_errorCode,
|
| pl_remoteDataVarName,
|
| pl_ownerCompRef,
|
| pl_localDataVarId,
|
| pl_dataValue,
|
| pl_userData
|
| );
|
|
|
| var integer vl_testIndex := pl_userData[c_Test_NonBlocking_UserData_Index_TestIndex];
|
| var boolean vl_negativeTest := pl_userData[c_Test_NonBlocking_UserData_Index_Positive] == c_Test_NonBlocking_Negative;
|
|
|
| if (not vl_negativeTest) {
|
| if (pl_localDataVarId < 0) {
|
| setverdict(fail,"Local data source variable should be positive. Current value: ", pl_localDataVarId, ". Test index: ", vl_testIndex);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| if (pl_ownerCompRef == null) {
|
| setverdict(fail,"Local data source component ref should not be null.", ". Test index: ", vl_testIndex);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
|
|
| if (not f_EPTF_Var_isPresentRemote(pl_ownerCompRef, pl_remoteDataVarName)) {
|
| setverdict(fail,"The variable is not prsesent, but the checkData return OK. Compref: ", pl_ownerCompRef, ", VarName: ", pl_remoteDataVarName, ". Test index: ", vl_testIndex);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
|
|
| setverdict(pass, "Parameters in the handler are valid");
|
| }
|
| } //group NonBlockingCheckData
|
|
|
| group NonBlockingGetDataValue {
|
|
|
| //This function is to handle data in condition handler function
|
| function f_EPTF_DataSourceTest_NonBlocking_getDataValue_getDataHandler(
|
| // reponse parameters:
|
| in integer pl_errorCode, // error code in the response
|
| in EPTF_Var_DirectContent pl_dataValue, // the value of the data
|
| // user data
|
| in EPTF_IntegerList pl_userData // user specific data given at the request
|
| ) runs on EPTF_CLL_Test_NonBlocking_CT {
|
|
|
| var integer vl_test_index := pl_userData[c_Test_NonBlocking_UserData_Index_TestIndex];
|
| var charstring vl_source := v_Test_NonBlocking_ReqList[vl_test_index].source;
|
| var charstring vl_ptcName := v_Test_NonBlocking_ReqList[vl_test_index].ptcName;
|
|
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_handlerCheck(
|
| vl_source,
|
| vl_ptcName,
|
| v_Test_NonBlocking_ReqList[vl_test_index].element,
|
| v_Test_NonBlocking_ReqList[vl_test_index].params,
|
| pl_errorCode,
|
| "",
|
| null,
|
| -1,
|
| pl_dataValue,
|
| pl_userData
|
| );
|
|
|
|
|
| if(vl_source != c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName) {
|
| if(vl_ptcName == "") {
|
| if(pl_errorCode != 3) { setverdict(fail, "pl_source not registered, pl_errorCode should be 3 but it's value is ", pl_errorCode) }
|
| } else {
|
| if(pl_errorCode != 4) { setverdict(fail, "pl_source not registered, pl_errorCode should be 4 but it's value is ", pl_errorCode) }
|
| }
|
| }
|
|
|
| setverdict(pass, "Parameters in the handler are valid");
|
|
|
| }
|
|
|
| //This function is to handle data in condition handler function
|
| function f_EPTF_DataSourceTest_NonBlocking_getDataValue_sizeOf (
|
| // reponse parameters:
|
| in integer pl_errorCode, // error code in the response
|
| in EPTF_Var_DirectContent pl_dataValue, // the value of the data
|
| // user data
|
| in EPTF_IntegerList pl_userData // user specific data given at the request
|
| ) runs on EPTF_CLL_Test_NonBlocking_CT {
|
|
|
| var integer vl_test_index := pl_userData[c_Test_NonBlocking_UserData_Index_TestIndex];
|
| f_EPTF_DataSource_Test_NonBlocking_handlerCheck(
|
| v_Test_NonBlocking_ReqList[vl_test_index].source,
|
| v_Test_NonBlocking_ReqList[vl_test_index].ptcName,
|
| v_Test_NonBlocking_ReqList[vl_test_index].element,
|
| v_Test_NonBlocking_ReqList[vl_test_index].params,
|
| pl_errorCode,
|
| "",
|
| null,
|
| -1,
|
| pl_dataValue,
|
| pl_userData
|
| );
|
|
|
| setverdict(pass, "Parameters in the handler are valid");
|
| }
|
|
|
| //this function call f_EPTF_DataSource_getDataValue_nonBlocking function with different parameters on DataSource Server
|
| function f_EPTF_CLL_DataSource_Test_getDataValue_nonblocking() runs on EPTF_CLL_DataSource_Test_NonBlocking_CT {
|
|
|
| timer t_wait := 1.0;
|
| t_wait.start; t_wait.timeout;
|
|
|
| var EPTF_CLL_DataSource_Test_NonBlocking_Handler vl_handler := {dataValueHandler:=refers(f_EPTF_DataSourceTest_NonBlocking_getDataValue_getDataHandler)};
|
|
|
| // find given element with pl_source given, pl_ptcName empty
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName,
|
| pl_method := "",
|
| pl_params := {{"paramSA", "valueA"}, {"paramSX", "valueX"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {intVal := 0},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| // find given element with pl_source given, pl_ptcName empty
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2,
|
| pl_method := "",
|
| pl_params := {{"paramSX", "valueX"}, {"paramSA", "valueA"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {intVal := 2},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| // find given element with pl_source given, pl_ptcName empty
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List,
|
| pl_method := "",
|
| pl_params := {},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {integerlistVal := {0,1,2,3,4,5,6,7,8,9}},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| // find given element with pl_source given, pl_ptcName empty
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_ListString,
|
| pl_method := "",
|
| pl_params := {},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {charstringlistVal := {"alma", "korte", "szilva", "szolo", "dinnye"}},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| // find given element with pl_source given, pl_ptcName empty
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_ListFloat,
|
| pl_method := "",
|
| pl_params := {},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {floatlistVal := {0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0}},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| // find given element with pl_source given, pl_ptcName empty
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName,
|
| pl_method := "",
|
| pl_params := {{c_EPTF_CLL_DataSourceClient_Test_DSOwnerValueHandlerParam, "20"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {intVal := c_EPTF_CLL_DataSourceClient_Test_BuiltInDataValue + 20},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| // test if all parameters are passed successfully
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName,
|
| pl_method := "",
|
| pl_params := {{c_EPTF_CLL_DataSourceClient_Test_DSOwnerValueHandlerParam, "20"},{c_EPTF_CLL_DataSourceClient_Test_DSOwnerValueHandlerParam2, "30"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {intVal := c_EPTF_CLL_DataSourceClient_Test_BuiltInDataValue + 20 + 30},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
|
|
| timer t_endTest := 3.0;
|
| t_endTest.start; t_endTest.timeout;
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_finish();
|
|
|
| f_EPTF_Base_stop(none);
|
| }
|
|
|
|
|
| function f_EPTF_CLL_DataSource_Test_getDataValue_nonblocking_negative() runs on EPTF_CLL_DataSource_Test_NonBlocking_CT {
|
|
|
| timer t_wait := 1.0;
|
| t_wait.start; t_wait.timeout;
|
|
|
| var EPTF_CLL_DataSource_Test_NonBlocking_Handler vl_handler := {dataValueHandler:=refers(f_EPTF_DataSourceTest_NonBlocking_getDataValue_getDataHandler)};
|
|
|
| // the element to be found does not exist for the valid datasource
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := "nonExistentElement",
|
| pl_method := "",
|
| pl_params := {},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| // no element given for the valid datasource
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_element := "", //empty element name
|
| pl_method := "",
|
| pl_params := {},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| // pl_source is invalid and ptc name is empty
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := "invalid_DSOwner", //invalid source name
|
| pl_ptcName := "",
|
| pl_element := "", //empty element name
|
| pl_method := "",
|
| pl_params := {},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| // pl_source is invalid and ptc name is not empty
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := "invalid_DSOwner", //invalid source name with
|
| pl_ptcName := "PtcName_notEmpty", //ptcName not ""
|
| pl_element := "", //empty element name
|
| pl_method := "",
|
| pl_params := {},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| timer t_endTest := 3.0;
|
| t_endTest.start; t_endTest.timeout;
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_finish();
|
|
|
| f_EPTF_Base_stop(none);
|
| }
|
| }
|
|
|
| group NonBlockingGetCondition {
|
|
|
| //This function is to handle data in condition handler function
|
| function f_EPTF_DataSourceTest_NonBlocking_checkCondition_getDataHandler(
|
| in charstring pl_source,
|
| in charstring pl_ptcName, // response may fill this if it was ""
|
| in charstring pl_element,
|
| in EPTF_DataSource_Params pl_params,
|
| // reponse parameters:
|
| in integer pl_errorCode, // error code in the response
|
| in charstring pl_remoteDataVarName, // var name on the remote component
|
| in EPTF_Var_CT/*EPTF_DataSourceClient_CT*/ pl_ownerCompRef,// reference to the remote component
|
| in integer pl_localDataVarId, // var id on the local component (contains the current value, not subscribed to remote!)
|
| in EPTF_Var_DirectContent pl_dataValue, // the value of the data
|
| // user data
|
| in EPTF_IntegerList pl_userData // user specific data given at the request
|
| ) runs on EPTF_CLL_Test_NonBlocking_CT {
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_handlerCheck(
|
| pl_source,
|
| pl_ptcName,
|
| pl_element,
|
| pl_params,
|
| pl_errorCode,
|
| pl_remoteDataVarName,
|
| pl_ownerCompRef,
|
| pl_localDataVarId,
|
| pl_dataValue,
|
| pl_userData
|
| );
|
|
|
| var integer vl_testIndex := pl_userData[c_Test_NonBlocking_UserData_Index_TestIndex];
|
| var boolean vl_negativeTest := pl_userData[c_Test_NonBlocking_UserData_Index_Positive] == c_Test_NonBlocking_Negative;
|
| var boolean vl_expectedNotSet := v_Test_NonBlocking_expectedValueList[vl_testIndex] == c_Test_NonBlocking_UserData_ExpectedValue_NOT_SET;
|
|
|
| if (not vl_negativeTest) {
|
| //check pl_localDataVarId
|
| if (pl_localDataVarId != -1) {
|
| setverdict(fail,"Local data source variable should be -1. Current value: ", pl_localDataVarId, ". Test index: ", vl_testIndex);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
|
|
| setverdict(pass, "Parameters in the handler are valid");
|
| }
|
|
|
| //Test cases of DataSourceClent_getCondition_NonBlcking
|
| function f_EPTF_CLL_DataSourceClient_Test_getCondition_nonBlocking(in charstring pl_selfName, in EPTF_DataSource_CT pl_sourceCompRef) runs on EPTF_CLL_DataSourceClient_Test_NonBlocking_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_sourceCompRef);
|
|
|
| timer t_wait := 1.0;
|
| t_wait.start; t_wait.timeout;
|
|
|
| var EPTF_CLL_DataSource_Test_NonBlocking_Handler vl_handler := {dataHandler:=refers(f_EPTF_DataSourceTest_NonBlocking_checkCondition_getDataHandler)};
|
|
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_CLL_DataSourceClient_Test_DSOwnerMethodName,
|
| pl_params := {{"paramX", "valueX"}, {"paramA", "valueA"}}, // they are not in lexical order!
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_CLL_DataSourceClient_Test_DSOwnerMethod2Name,
|
| pl_params := {{"paramX2", "valueX2"}, {"paramA2", "valueA2"}, {"paramX1", "valueX1"}}, // they are not in lexical order!
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource dataElement -equal false
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_equal,
|
| pl_params := {{"paramX2", "valueX2"}, {"paramA2", "valueA2"}}, // they are not in lexical order!
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource dataElement -equal true
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_equal,
|
| pl_params := {{"paramX2", "valueX"}, {"paramA2", "valueX"}}, // they are not in lexical order!
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource dataElement -equal few param
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_equal,
|
| pl_params := {{"paramX2", "valueX"}}, // they are not in lexical order!
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource dataElement -equal too many param
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_equal,
|
| pl_params := {{"paramX2", "valueX"}, {"paramX2", "valueX"}, {"paramC2", "valueX"}}, // they are not in lexical order!
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| // dataElementPresent - true
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_dataElementPresent,
|
| pl_params := {
|
| {c_EPTF_DataSource_paramNameSource, c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName},
|
| {c_EPTF_DataSource_paramNameElement, c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2}
|
| },
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| // dataElementPresent -with non existing source (it is a positive test: te reply will be false
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_dataElementPresent,
|
| pl_params := {
|
| {c_EPTF_DataSource_paramNameSource, c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName & "nonexist"},
|
| {c_EPTF_DataSource_paramNameElement, c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2}
|
| },
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| // dataElementPresent -with non existing element (it is a positive test: te reply will be false)
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_dataElementPresent,
|
| pl_params := {
|
| {c_EPTF_DataSource_paramNameSource, c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName},
|
| {c_EPTF_DataSource_paramNameElement, c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2 & "nonexist"}
|
| },
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| // dataElementPresent -with non existing param (it is a positive test: reply will be false)
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_dataElementPresent,
|
| pl_params := {
|
| {c_EPTF_DataSource_paramNameSource, c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName},
|
| {c_EPTF_DataSource_paramNameElement, c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2},
|
| {c_EPTF_DataSource_paramNameParamName, c_TestNonBlocking_BuiltIn_Error_paramName},
|
| {c_EPTF_DataSource_paramNameParamValue, "builtInErrorValue"}
|
| },
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| // dataElementPresent -with syntax error in params - negative
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_dataElementPresent,
|
| pl_params := {
|
| {c_EPTF_DataSource_paramNameSource, c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName},
|
| {c_EPTF_DataSource_paramNameElement, c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2},
|
| {c_EPTF_DataSource_paramNameParamName, c_TestNonBlocking_BuiltIn_Error_paramName},
|
| {"SyntaxErrorParamName", "errorValue"},
|
| {c_EPTF_DataSource_paramNameParamValue, "builtInErrorValue"}
|
| },
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| // dataElementPresent -with syntax error in params - negative
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_dataElementPresent,
|
| pl_params := {
|
| {c_EPTF_DataSource_paramNameSource, c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName},
|
| {c_EPTF_DataSource_paramNameElement, c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2},
|
| {c_EPTF_DataSource_paramNameParamValue, "builtInErrorValue"},
|
| {c_EPTF_DataSource_paramNameParamName, c_TestNonBlocking_BuiltIn_Error_paramName}
|
| },
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource not equal - true
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notEqual,
|
| pl_params := {{"paramX2", "valueX"}, {"paramA2", "valueY"}}, // they are not in lexical order!
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource not equal - false
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notEqual,
|
| pl_params := {{"paramX2", "valueX"}, {"paramA2", "valueX"}}, // they are not in lexical order!
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource not equal - few params
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notEqual,
|
| pl_params := {{"paramX2", "valueX"}}, // they are not in lexical order!
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource not equal - too many params
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notEqual,
|
| pl_params := {{"paramX2", "valueX"}, {"paramA2", "valueX"}, {"paramC2", "valueX"}},// they are not in lexical order!
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_more false
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_more,
|
| pl_params := {{"paramX2", "1.2"}, {"paramA2", "2.3"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_more false - lexical order
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_more,
|
| pl_params := {{"paramA2", "1.2"}, {"paramB2", "2.3"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_more true
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_more,
|
| pl_params := {{"paramX2", "-1.2"}, {"paramA2", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_more false - equal
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_more,
|
| pl_params := {{"paramX2", "-1.2"}, {"paramA2", "-1.2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_more true - lexical order
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_more,
|
| pl_params := {{"paramA2", "-1.2"}, {"paramB2", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_more error: not number
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_more,
|
| pl_params := {{"paramX2", "-1.2aaa"}, {"paramA2", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_more error: few params
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_more,
|
| pl_params := {{"paramX2", "-1.2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_more error: too many params
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_more,
|
| pl_params := {{"paramX2", "-1.2"}, {"paramA2", "-2"}, {"paramC2", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notLess - true - lexical order
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notLess,
|
| pl_params := {{"paramA2", "-1.2"}, {"paramB2", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notLess - true - not lexical order
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notLess,
|
| pl_params := {{"paramB", "-1.2"}, {"paramA", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notLess - true - equal
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notLess,
|
| pl_params := {{"paramB", "-1.2"}, {"paramA", "-1.2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notLess - false - lexical order
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notLess,
|
| pl_params := {{"paramA2", "-1.2"}, {"paramB2", "2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notLess - false - not lexical order
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notLess,
|
| pl_params := {{"paramB", "-1.2"}, {"paramA", "2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notLess - error - not number
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notLess,
|
| pl_params := {{"paramB", "-1.2x"}, {"paramA", "2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notLess - error - few params
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notLess,
|
| pl_params := {{"paramB", "-1.2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notLess - error - too many params
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notLess,
|
| pl_params := {{"paramB", "-1.2"}, {"paramA", "2"}, {"paramC", "2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_less - true - lexical order
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_less,
|
| pl_params := {{"paramA2", "-1.2"}, {"paramB2", "2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_less - true - not lexical order
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_less,
|
| pl_params := {{"paramB", "-1.2"}, {"paramA", "2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_less - false - not lexical order
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_less,
|
| pl_params := {{"paramB", "-1.2"}, {"paramA", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_less - false - lexical order
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_less,
|
| pl_params := {{"paramA", "-1.2"}, {"paramB", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_less - false - equal
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_less,
|
| pl_params := {{"paramA", "-1.2"}, {"paramB", "-1.2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_less - error - not number
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_less,
|
| pl_params := {{"paramA", "-1.2aaaa"}, {"paramB", "-1.2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_less - error - few params
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_less,
|
| pl_params := {{"paramA", "-1.2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_less - error - too many params
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_less,
|
| pl_params := {{"paramA", "-1.2"}, {"paramB", "-1.2"}, {"paramC", "-1.2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMore - true - lexical order
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMore,
|
| pl_params := {{"paramA2", "-1.2"}, {"paramB2", "2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMore - true - not lexical order
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMore,
|
| pl_params := {{"paramB", "-1.2"}, {"paramA", "2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMore - true - equal
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMore,
|
| pl_params := {{"paramB", "-1.2"}, {"paramA", "-1.2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMore - false - lexical order
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMore,
|
| pl_params := {{"paramA2", "-1.2"}, {"paramB2", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMore - false - not lexical order
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMore,
|
| pl_params := {{"paramB", "-1.2"}, {"paramA", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMore - error - not number
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMore,
|
| pl_params := {{"paramB", "-1.2a"}, {"paramA", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMore - error - not number
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMore,
|
| pl_params := {{"paramB", "b-1.2"}, {"paramA", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMore - error - not number
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMore,
|
| pl_params := {{"paramB", "-1c.2a"}, {"paramA", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMore - error - few params
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMore,
|
| pl_params := {{"paramB", "-1.2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMore - error - too many params
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMore,
|
| pl_params := {{"paramB", "-1.2"}, {"paramA", "-2"}, {"paramC", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_match - true - lexical order
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_match,
|
| pl_params := {{"paramA2", "Kutyauto"}, {"paramB2", "K?ty*o"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_match - true - not lexical order
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_match,
|
| pl_params := {{"paramB", "Kutyauto"}, {"paramA", "K?ty*o"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_match - false - not lexical order
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_match,
|
| pl_params := {{"paramB", "Kutyauto"}, {"paramA", "K?ty*ok"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_match - false - lexical order
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_match,
|
| pl_params := {{"paramA", "Kutyauto"}, {"paramB", "K?ty*ok"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_match - error - few params
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_match,
|
| pl_params := {{"paramA", "Kutyauto"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_match - error - too many params
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_match,
|
| pl_params := {{"paramA", "Kutyauto"}, {"paramB", "Kutyauto"}, {"paramC", "Kutyauto"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMatch - true - lexical order
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMatch,
|
| pl_params := {{"paramA2", "Kutyauto"}, {"paramB2", "K?ty*ok"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMatch - true - not lexical order
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMatch,
|
| pl_params := {{"paramB", "Kutyauto"}, {"paramA", "K?ty*ok"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMatch - false - lexical order
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMatch,
|
| pl_params := {{"paramA", "Kutyauto"}, {"paramB", "K?ty*o"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMatch - false - not lexical order
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMatch,
|
| pl_params := {{"paramB", "Kutyauto"}, {"paramA", "K?ty*o"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMatch - error - few param
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMatch,
|
| pl_params := {{"paramB", "K?tyauto"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMatch - error - too many param
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMatch,
|
| pl_params := {{"paramB", "K?tyauto"}, {"paramA", "K?tyauto"},{"paramC", "K?tyauto"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_and - true
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_and,
|
| pl_params := {{"paramA2", c_EPTF_DataSource_condition_value_true}, {"paramB2", c_EPTF_DataSource_condition_value_true}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_and - true
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_and,
|
| pl_params := {{"paramA2", log2str(1 < 2)}, {"paramB2", log2str(1 < 2)}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_and - false
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_and,
|
| pl_params := {{"paramA2", c_EPTF_DataSource_condition_value_true}, {"paramB2", c_EPTF_DataSource_condition_value_false}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_and - false
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_and,
|
| pl_params := {{"paramA2", c_EPTF_DataSource_condition_value_false}, {"paramB2", c_EPTF_DataSource_condition_value_true}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_and - false
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_and,
|
| pl_params := {{"paramA2", c_EPTF_DataSource_condition_value_false}, {"paramB2", c_EPTF_DataSource_condition_value_false}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_and - error - bad params
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_and,
|
| pl_params := {{"paramA2", c_EPTF_DataSource_condition_value_false}, {"paramB2", "aaa"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_and - error - few params
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_and,
|
| pl_params := {{"paramA2", c_EPTF_DataSource_condition_value_false}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_and - error - too many params
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_and,
|
| pl_params := {{"paramA2", c_EPTF_DataSource_condition_value_false}, {"paramB", c_EPTF_DataSource_condition_value_false}, {"paramC", c_EPTF_DataSource_condition_value_false}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_or - true
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_or,
|
| pl_params := {{"paramA2", c_EPTF_DataSource_condition_value_true}, {"paramB2", c_EPTF_DataSource_condition_value_true}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_or - true
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_or,
|
| pl_params := {{"paramA2", c_EPTF_DataSource_condition_value_true}, {"paramB2", c_EPTF_DataSource_condition_value_false}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_or - true
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_or,
|
| pl_params := {{"paramA2", c_EPTF_DataSource_condition_value_false}, {"paramB2", c_EPTF_DataSource_condition_value_true}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_or - true
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_or,
|
| pl_params := {{"paramA2", log2str(1 < 2)}, {"paramB2", log2str(1 < 2)}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_or - true
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_or,
|
| pl_params := {{"paramA2", log2str(1 > 2)}, {"paramB2", log2str(1 < 2)}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_or - true
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_or,
|
| pl_params := {{"paramA2", log2str(1 < 2)}, {"paramB2", log2str(1 > 2)}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_or - false
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_or,
|
| pl_params := {{"paramA2", c_EPTF_DataSource_condition_value_false}, {"paramB2", c_EPTF_DataSource_condition_value_false}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_or - false
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_or,
|
| pl_params := {{"paramA2", log2str(1 > 2)}, {"paramB2", log2str(1 > 2)}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_or - error - bad param
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_or,
|
| pl_params := {{"paramA2", c_EPTF_DataSource_condition_value_false}, {"paramB2", "badParam"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_or - error - few param
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_or,
|
| pl_params := {{"paramA2", c_EPTF_DataSource_condition_value_false}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_or - error - too many params
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_or,
|
| pl_params := {{"paramA2", c_EPTF_DataSource_condition_value_false}, {"paramB", c_EPTF_DataSource_condition_value_false}, {"paramC", c_EPTF_DataSource_condition_value_false}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_not - true
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_not,
|
| pl_params := {{"paramA2", c_EPTF_DataSource_condition_value_false}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_not - true
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_not,
|
| pl_params := {{"paramA2", log2str(1 > 2)}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_not - false
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_not,
|
| pl_params := {{"paramA2", c_EPTF_DataSource_condition_value_true}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_not - false
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_not,
|
| pl_params := {{"paramA2", log2str(1 < 2)}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_not - error - bad param
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_not,
|
| pl_params := {{"paramA2", "aaa"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_not - error - few params
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_not,
|
| pl_params := {},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_not - error - too many params
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_not,
|
| pl_params := {{"paramA2", log2str(1 < 2)}, {"paramB", log2str(1 < 2)}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource bad condition
|
| f_EPTF_DataSourceClient_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := "notExistCondition",
|
| pl_params := {{"paramA2", log2str(1 < 2)}, {"paramB", log2str(1 < 2)}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getConditionClient,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
|
|
| //this function call f_EPTF_DataSource_getCondition_nonBlocking function with different parameters on DataSource Server
|
| function f_EPTF_CLL_DataSource_Test_getCondition_nonBlocking() runs on EPTF_CLL_DataSource_Test_NonBlocking_CT {
|
|
|
| timer t_wait := 1.0;
|
| t_wait.start; t_wait.timeout;
|
|
|
| var EPTF_CLL_DataSource_Test_NonBlocking_Handler vl_handler := {dataHandler:=refers(f_EPTF_DataSourceTest_NonBlocking_checkCondition_getDataHandler)};
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_CLL_DataSourceClient_Test_DSOwnerMethodName,
|
| pl_params := {{"paramSX", "valueX"}, {"paramSA", "valueA"}}, // they are not in lexical order!
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_CLL_DataSourceClient_Test_DSOwnerMethod2Name,
|
| pl_params := {{"paramSX2", "valueX2"}, {"paramSA2", "valueA2"}, {"paramSX1", "valueX1"}}, // they are not in lexical order!
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| //dataSource dataElement -equal false
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_equal,
|
| pl_params := {{"paramSX2", "valueX2"}, {"paramSA2", "valueA2"}}, // they are not in lexical order!
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource dataElement -equal true
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_equal,
|
| pl_params := {{"paramX2", "valueX"}, {"paramSA2", "valueX"}}, // they are not in lexical order!
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource dataElement -equal few param
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_equal,
|
| pl_params := {{"paramSX2", "valueX"}}, // they are not in lexical order!
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource dataElement -equal too many param
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_equal,
|
| pl_params := {{"paramSX2", "valueX"}, {"paramSX2", "valueX"}, {"paramSC2", "valueX"}}, // they are not in lexical order!
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| // dataElementPresent - true
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_dataElementPresent,
|
| pl_params := {
|
| {c_EPTF_DataSource_paramNameSource, c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName},
|
| {c_EPTF_DataSource_paramNameElement, c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2}
|
| },
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| // dataElementPresent -with non existing source (it is a positive test: te reply will be false
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_dataElementPresent,
|
| pl_params := {
|
| {c_EPTF_DataSource_paramNameSource, c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName & "nonexist"},
|
| {c_EPTF_DataSource_paramNameElement, c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2}
|
| },
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| // dataElementPresent -with non existing element (it is a positive test: te reply will be false)
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_dataElementPresent,
|
| pl_params := {
|
| {c_EPTF_DataSource_paramNameSource, c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName},
|
| {c_EPTF_DataSource_paramNameElement, c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2 & "nonexist"}
|
| },
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| // dataElementPresent -with non existing param (it is a positive test: reply will be false)
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_dataElementPresent,
|
| pl_params := {
|
| {c_EPTF_DataSource_paramNameSource, c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName},
|
| {c_EPTF_DataSource_paramNameElement, c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2},
|
| {c_EPTF_DataSource_paramNameParamName, c_TestNonBlocking_BuiltIn_Error_paramName},
|
| {c_EPTF_DataSource_paramNameParamValue, "builtInErrorValue"}
|
| },
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect
|
| );
|
|
|
| // dataElementPresent -with syntax error in params - negative
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_dataElementPresent,
|
| pl_params := {
|
| {c_EPTF_DataSource_paramNameSource, c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName},
|
| {c_EPTF_DataSource_paramNameElement, c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2},
|
| {c_EPTF_DataSource_paramNameParamName, c_TestNonBlocking_BuiltIn_Error_paramName},
|
| {"SyntaxErrorParamName", "errorValue"},
|
| {c_EPTF_DataSource_paramNameParamValue, "builtInErrorValue"}
|
| },
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| // dataElementPresent -with syntax error in params - negative
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_dataElementPresent,
|
| pl_params := {
|
| {c_EPTF_DataSource_paramNameSource, c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName},
|
| {c_EPTF_DataSource_paramNameElement, c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2},
|
| {c_EPTF_DataSource_paramNameParamValue, "builtInErrorValue"},
|
| {c_EPTF_DataSource_paramNameParamName, c_TestNonBlocking_BuiltIn_Error_paramName}
|
| },
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource not equal - true
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notEqual,
|
| pl_params := {{"paramSX1", "valueX"}, {"paramSA2", "valueY"}}, // they are not in lexical order!
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource not equal - false
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notEqual,
|
| pl_params := {{"paramXS1", "valueX"}, {"paramSA2", "valueX"}}, // they are not in lexical order!
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource not equal - few params
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notEqual,
|
| pl_params := {{"paramS1", "valueX"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource not equal - too many params
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notEqual,
|
| pl_params := {{"paramS1", "valueX"}, {"paramS2", "valueX"}, {"paramS3", "valueX"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_more false
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_more,
|
| pl_params := {{"paramSX2", "1.2"}, {"paramSA2", "2.3"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_more false - lexical order
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_more,
|
| pl_params := {{"paramSA2", "1.2"}, {"paramSB2", "2.3"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_more true
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_more,
|
| pl_params := {{"paramSX2", "-1.2"}, {"paramSA2", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_more false - equal
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_more,
|
| pl_params := {{"paramSX2", "-1.2"}, {"paramSA2", "-1.2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_more true - lexical order
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_more,
|
| pl_params := {{"paramSA2", "-1.2"}, {"paramSB2", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_more error: not number
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_more,
|
| pl_params := {{"paramSX2", "-1.2aaa"}, {"paramSA2", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_more error: few params
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_more,
|
| pl_params := {{"paramSX2", "-1.2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_more error: too many params
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_more,
|
| pl_params := {{"paramSX2", "-1.2"}, {"paramSA2", "-2"}, {"paramSC2", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notLess - true - lexical order
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notLess,
|
| pl_params := {{"paramSA2", "-1.2"}, {"paramSB2", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notLess - true - not lexical order
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notLess,
|
| pl_params := {{"paramSB", "-1.2"}, {"paramSA", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notLess - true - equal
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notLess,
|
| pl_params := {{"paramSB", "-1.2"}, {"paramSA", "-1.2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notLess - false - lexical order
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notLess,
|
| pl_params := {{"paramSA2", "-1.2"}, {"paramSB2", "2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notLess - false - not lexical order
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notLess,
|
| pl_params := {{"paramSB", "-1.2"}, {"paramSA", "2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notLess - error - not number
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notLess,
|
| pl_params := {{"paramSB", "-1.2x"}, {"paramSA", "2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notLess - error - few params
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notLess,
|
| pl_params := {{"paramSB", "-1.2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notLess - error - too many params
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notLess,
|
| pl_params := {{"paramSB", "-1.2"}, {"paramSA", "2"}, {"paramSC", "2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_less - true - lexical order
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_less,
|
| pl_params := {{"paramSA2", "-1.2"}, {"paramSB2", "2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_less - true - not lexical order
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_less,
|
| pl_params := {{"paramSB", "-1.2"}, {"paramSA", "2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_less - false - not lexical order
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_less,
|
| pl_params := {{"paramSB", "-1.2"}, {"paramSA", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_less - false - lexical order
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_less,
|
| pl_params := {{"paramSA", "-1.2"}, {"paramSB", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_less - false - equal
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_less,
|
| pl_params := {{"paramSA", "-1.2"}, {"paramSB", "-1.2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_less - error - not number
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_less,
|
| pl_params := {{"paramSA", "-1.2aaaa"}, {"paramSB", "-1.2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_less - error - few params
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_less,
|
| pl_params := {{"paramSA", "-1.2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_less - error - too many params
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_less,
|
| pl_params := {{"paramSA", "-1.2"}, {"paramSB", "-1.2"}, {"paramSC", "-1.2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMore - true - lexical order
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMore,
|
| pl_params := {{"paramSA2", "-1.2"}, {"paramSB2", "2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMore - true - not lexical order
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMore,
|
| pl_params := {{"paramSB", "-1.2"}, {"paramSA", "2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMore - true - equal
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMore,
|
| pl_params := {{"paramSB", "-1.2"}, {"paramSA", "-1.2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMore - false - lexical order
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMore,
|
| pl_params := {{"paramSA2", "-1.2"}, {"paramSB2", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMore - false - not lexical order
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMore,
|
| pl_params := {{"paramSB", "-1.2"}, {"paramSA", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMore - error - not number
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMore,
|
| pl_params := {{"paramSB", "-1.2a"}, {"paramSA", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMore - error - not number
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMore,
|
| pl_params := {{"paramSB", "a-1.2"}, {"paramSA", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMore - error - not number
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMore,
|
| pl_params := {{"paramSB", "-1.a2"}, {"paramSA", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMore - error - few params
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMore,
|
| pl_params := {{"paramSB", "-1.2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMore - error - too many params
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMore,
|
| pl_params := {{"paramSB", "-1.2"}, {"paramSA", "-2"}, {"paramSC", "-2"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_match - true - lexical order
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_match,
|
| pl_params := {{"paramSA2", "Kutyauto"}, {"paramSB2", "K?ty*o"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_match - true - not lexical order
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_match,
|
| pl_params := {{"paramSB", "Kutyauto"}, {"paramSA", "K?ty*o"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_match - false - not lexical order
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_match,
|
| pl_params := {{"paramSB", "Kutyauto"}, {"paramSA", "K?ty*ok"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_match - false - lexical order
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_match,
|
| pl_params := {{"paramSA", "Kutyauto"}, {"paramSB", "K?ty*ok"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_match - error - few params
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_match,
|
| pl_params := {{"paramSA", "Kutyauto"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_match - error - too many params
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_match,
|
| pl_params := {{"paramSA", "Kutyauto"}, {"paramSB", "Kutyauto"}, {"paramSC", "Kutyauto"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMatch - true - lexical order
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMatch,
|
| pl_params := {{"paramSA2", "Kutyauto"}, {"paramSB2", "K?ty*ok"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMatch - true - not lexical order
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMatch,
|
| pl_params := {{"paramSB", "Kutyauto"}, {"paramSA", "K?ty*ok"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMatch - false - lexical order
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMatch,
|
| pl_params := {{"paramSA", "Kutyauto"}, {"paramSB", "K?ty*o"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMatch - false - not lexical order
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMatch,
|
| pl_params := {{"paramSB", "Kutyauto"}, {"paramSA", "K?ty*o"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMatch - error - few param
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMatch,
|
| pl_params := {{"paramSB", "K?tyauto"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_notMatch - error - too many param
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_notMatch,
|
| pl_params := {{"paramSB", "K?tyauto"}, {"paramSA", "K?tyauto"},{"paramSC", "K?tyauto"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_and - true
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_and,
|
| pl_params := {{"paramSA2", c_EPTF_DataSource_condition_value_true}, {"paramSB2", c_EPTF_DataSource_condition_value_true}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_and - true
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_and,
|
| pl_params := {{"paramSA2", log2str(1 < 2)}, {"paramSB2", log2str(1 < 2)}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_and - false
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_and,
|
| pl_params := {{"paramSA2", c_EPTF_DataSource_condition_value_true}, {"paramSB2", c_EPTF_DataSource_condition_value_false}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_and - false
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_and,
|
| pl_params := {{"paramSA2", c_EPTF_DataSource_condition_value_false}, {"paramSB2", c_EPTF_DataSource_condition_value_true}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_and - false
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_and,
|
| pl_params := {{"paramSA2", c_EPTF_DataSource_condition_value_false}, {"paramSB2", c_EPTF_DataSource_condition_value_false}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_and - error - bad params
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_and,
|
| pl_params := {{"paramSA2", c_EPTF_DataSource_condition_value_false}, {"paramSB2", "aaa"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_and - error - few params
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_and,
|
| pl_params := {{"paramSA2", c_EPTF_DataSource_condition_value_false}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_and - error - too many params
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_and,
|
| pl_params := {{"paramSA2", c_EPTF_DataSource_condition_value_false}, {"paramSB", c_EPTF_DataSource_condition_value_false}, {"paramSC", c_EPTF_DataSource_condition_value_false}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_or - true
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_or,
|
| pl_params := {{"paramSA2", c_EPTF_DataSource_condition_value_true}, {"paramSB2", c_EPTF_DataSource_condition_value_true}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_or - true
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_or,
|
| pl_params := {{"paramSA2", c_EPTF_DataSource_condition_value_true}, {"paramSB2", c_EPTF_DataSource_condition_value_false}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_or - true
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_or,
|
| pl_params := {{"paramSA2", c_EPTF_DataSource_condition_value_false}, {"paramSB2", c_EPTF_DataSource_condition_value_true}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_or - true
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_or,
|
| pl_params := {{"paramSA2", log2str(1 < 2)}, {"paramSB2", log2str(1 < 2)}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_or - true
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_or,
|
| pl_params := {{"paramSA2", log2str(1 > 2)}, {"paramSB2", log2str(1 < 2)}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_or - true
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_or,
|
| pl_params := {{"paramSA2", log2str(1 < 2)}, {"paramSB2", log2str(1 > 2)}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_or - false
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_or,
|
| pl_params := {{"paramSA2", c_EPTF_DataSource_condition_value_false}, {"paramSB2", c_EPTF_DataSource_condition_value_false}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_or - false
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_or,
|
| pl_params := {{"paramSA2", log2str(1 > 2)}, {"paramSB2", log2str(1 > 2)}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_or - error - bad param
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_or,
|
| pl_params := {{"paramSA2", c_EPTF_DataSource_condition_value_false}, {"paramSB2", "badParam"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_or - error - few param
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_or,
|
| pl_params := {{"paramSA2", c_EPTF_DataSource_condition_value_false}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_or - error - too many params
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_or,
|
| pl_params := {{"paramSA2", c_EPTF_DataSource_condition_value_false}, {"paramSB", c_EPTF_DataSource_condition_value_false}, {"paramSC", c_EPTF_DataSource_condition_value_false}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_not - true
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_not,
|
| pl_params := {{"paramSA2", c_EPTF_DataSource_condition_value_false}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_not - true
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_not,
|
| pl_params := {{"paramSA2", log2str(1 > 2)}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := true},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_not - false
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_not,
|
| pl_params := {{"paramSA2", c_EPTF_DataSource_condition_value_true}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_not - false
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_not,
|
| pl_params := {{"paramSA2", log2str(1 < 2)}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {boolVal := false},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_not - error - bad param
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_not,
|
| pl_params := {{"paramSA2", "aaa"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_not - error - few params
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_not,
|
| pl_params := {},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource c_EPTF_DataSource_condition_not - error - too many params
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := c_EPTF_DataSource_condition_not,
|
| pl_params := {{"paramSA2", log2str(1 < 2)}, {"paramSB", log2str(1 < 2)}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| //dataSource bad condition
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_DataSource_sourceId,
|
| pl_ptcName := "",
|
| pl_method := "notExistCondition",
|
| pl_params := {{"paramSA2", log2str(1 < 2)}, {"paramSB", log2str(1 < 2)}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_getCondition,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect
|
| );
|
|
|
| timer t_endTest := 10.0;
|
| t_endTest.start; t_endTest.timeout;
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_finish();
|
|
|
| f_EPTF_Base_stop(none);
|
| }
|
|
|
|
|
| // checkNonExistentDataSource:
|
| function f_EPTF_CLL_DataSourceClient_test_checkNonExistentDataSource_getCondition_nonBlocking() runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT {
|
|
|
| //no warning in client:
|
| //f_EPTF_DataSource_Test_ExpectedWarning_setExpectedWarning("*Cannot get source component for dataSource *: Source is not registered*");
|
| var charstring vl_dataVarName;
|
| var integer vl_errorCode;
|
| // Source: DataSource
|
|
|
| vl_errorCode := f_EPTF_DataSourceClient_getCondition_nonBlocking(
|
| pl_source := "NonExistentSource",
|
| pl_ptcName := "",
|
| pl_method := "==",
|
| pl_params := {},
|
| pl_getConditionHandler := {refers(f_EPTF_DataSource_Test_getData_nonBlocking_getDataHandler),{0,-1}}
|
| );
|
|
|
| }
|
|
|
| function f_EPTF_DataSourceClient_behaviour_checkNonExistentDataSource_getCondition_nonBlocking(
|
| in charstring pl_dataProviderName,
|
| in EPTF_DataSource_CT pl_dataSourceCompRef,
|
| in charstring pl_selfName := "EPTF_CLL_DataSourceClient_Test"
|
| ) runs on EPTF_CLL_DataSourceClient_Test_ExpectedWarning_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_dataSourceCompRef);
|
| //no warning in client:
|
| //f_EPTF_DataSource_Test_ExpectedWarning_init();
|
| f_EPTF_DataSourceClient_registerData(
|
| pl_source := pl_dataProviderName,
|
| pl_ptcName := f_EPTF_Base_selfName(),
|
| pl_dataHandler := refers(f_EPTF_DataSourceClient_CheckParamOrder_IteratorHandler)
|
| );
|
|
|
| f_EPTF_CLL_DataSourceClient_test_checkNonExistentDataSource_getCondition_nonBlocking();
|
|
|
| var integer vl_idx;
|
| f_EPTF_Var_newInt("Done.",1,vl_idx); // signal the end
|
|
|
| f_EPTF_Base_wait4Shutdown();
|
| }
|
| }//group NonBlockingGetCondition
|
|
|
| group setDataValueNonBlocking {
|
|
|
| //This function is to handle data in condicion handler function
|
| function f_EPTF_DataSourceTest_NonBlocking_setDataValue_getDataHandler(
|
| // reponse parameters:
|
| in integer pl_errorCode, // error code in the response
|
| in EPTF_Var_DirectContent pl_dataValue, // the value of the data
|
| // user data
|
| in EPTF_IntegerList pl_userData // user specific data given at the request
|
| ) runs on EPTF_CLL_Test_NonBlocking_CT {
|
|
|
| var integer vl_test_index := pl_userData[c_Test_NonBlocking_UserData_Index_TestIndex];
|
| var charstring vl_element := v_Test_NonBlocking_ReqList[vl_test_index].element;
|
| var EPTF_DataSource_Params vl_params := v_Test_NonBlocking_ReqList[vl_test_index].params;
|
| var EPTF_IntegerList vl_indexList := v_Test_NonBlocking_ReqList[vl_test_index].indexList;
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_handlerCheck(
|
| v_Test_NonBlocking_ReqList[vl_test_index].source,
|
| v_Test_NonBlocking_ReqList[vl_test_index].ptcName,
|
| vl_element,
|
| vl_params,
|
| pl_errorCode,
|
| "",
|
| null,
|
| -1,
|
| pl_dataValue,
|
| pl_userData
|
| );
|
|
|
| var integer vl_testIndex := pl_userData[c_Test_NonBlocking_UserData_Index_TestIndex];
|
| var boolean vl_negativeTest := pl_userData[c_Test_NonBlocking_UserData_Index_Positive] == c_Test_NonBlocking_Negative;
|
| var charstring vl_testDescription := v_Test_NonBlocking_testDescriptionList[vl_testIndex];
|
| var charstring vl_errorLog := log2str(" Test index: ", vl_testIndex, ". Test description: ", vl_testDescription);
|
|
|
| if (not vl_negativeTest) {
|
| //check the list params if it is set by setData not SetDataValue
|
| var EPTF_CharstringList pl_result := {};
|
| f_EPTF_DataSource_extractParams(vl_params,
|
| {c_EPTF_CLL_DataSourceClient_Test_DSOwnerValueHandlerParam},
|
| pl_result
|
| )
|
| if (pl_result[0] == "" and vl_element == c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List) {
|
| var EPTF_Var_DirectContent vl_content;
|
| if (not f_EPTF_Var_getRemoteContent(v_Test_NonBlocking_clientRef, c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List&"."&c_EPTF_CLL_DataSourceClient_Test_DSOwnerDataVarName, vl_content)) {
|
| setverdict(fail,"Variable does not exist. Var name: ", c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List&"."&c_EPTF_CLL_DataSourceClient_Test_DSOwnerDataVarName, ".", vl_errorLog);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| if (vl_indexList != {}) {
|
| var EPTF_IntegerList vl_expectedResult := c_EPTF_CLL_DataSourceClient_Test_DSOwnerListInit;
|
| for (var integer i := 0; i < sizeof(vl_indexList); i := i + 1) {
|
| var integer index := vl_indexList[i];
|
| vl_expectedResult[index] := v_Test_NonBlocking_valueToSetList[vl_testIndex].integerlistVal[i];
|
| }
|
| if (vl_expectedResult != vl_content.integerlistVal) {
|
| setverdict(fail,"Expected value of valiable list is not correct. Var name: ", c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List&"."&c_EPTF_CLL_DataSourceClient_Test_DSOwnerDataVarName,
|
| ". Expected value: ", vl_expectedResult, ", the value of variable is: ", vl_content.integerlistVal, ".", vl_errorLog);
|
| f_EPTF_Base_stopAll(none);
|
| }
|
| }
|
| }
|
| }
|
|
|
| setverdict(pass, "Parameters in the handler are valid");
|
| }
|
|
|
| //this function initialize datasource and client for test setDataValue_nonBlocking
|
| function f_EPTF_CLL_DataSource_Test_setDataValue_nonBlocking_init(in charstring pl_name, in charstring pl_errMessage := "", in charstring pl_warningMessage := "") runs on EPTF_CLL_DataSource_Test_NonBlocking_CT {
|
|
|
| var charstring c_test := "DataSource_setDataValueNonBlocking" & pl_name;
|
|
|
| //init Datasource
|
| f_EPTF_DataSource_init_CT(c_test & "_Test");
|
|
|
| // start DSClient DataOwner CT
|
| var EPTF_DataSource_CT vl_dataSourceComp := self;
|
| var EPTF_CLL_DataSource_Client_CT vl_client_owner := EPTF_CLL_DataSource_Client_CT.create;
|
| vl_client_owner.start(f_EPTF_CLL_DataSourceClient_Test_dsOwnerBehaviour(c_test & "_DsOwner",vl_dataSourceComp, pl_errMessage, pl_warningMessage));
|
| v_Test_NonBlocking_clientRef := vl_client_owner;
|
|
|
| timer t_wait := 1.0;
|
| t_wait.start; t_wait.timeout;
|
| }
|
|
|
| //this function call f_EPTF_DataSource_getCondition_nonBlocking function with different parameters on DataSource Server to test if setDataValue works correctly
|
| function f_EPTF_CLL_DataSource_Test_setDataValue_nonBlocking() runs on EPTF_CLL_DataSource_Test_NonBlocking_CT {
|
|
|
| var EPTF_CLL_DataSource_Test_NonBlocking_Handler vl_handler := {dataValueHandler:=refers(f_EPTF_DataSourceTest_NonBlocking_setDataValue_getDataHandler)};
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName,
|
| pl_params := {{c_EPTF_CLL_DataSourceClient_Test_DSOwnerValueHandlerParam, "50"}},
|
| pl_ValueToSet := {intVal := 106},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {intVal := (106 + 50)},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_setDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect,
|
| pl_testDescription := "test to set intVal for eptf_variable which is handled in setValueHandler"
|
| );
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_Value,
|
| pl_ValueToSet := {intVal := 107},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {intVal := 107},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_setDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect,
|
| pl_testDescription := "test to set intVal for a non eptf_variable which is handled in setValueHandler"
|
| );
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_Value,
|
| pl_params := {{c_EPTF_CLL_DataSourceClient_Test_DSOwnerValueHandlerParam, "50"}},
|
| pl_ValueToSet := {intVal := 108},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {intVal := (108 + 50)},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_setDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect,
|
| pl_testDescription := "test to set intVal for a non eptf_variable which is handled in setValueHandler with param"
|
| );
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_Value,
|
| pl_params := {{"NotWaitedParam", "50"}},
|
| pl_ValueToSet := {intVal := 109},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {intVal := 109},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_setDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect,
|
| pl_testDescription := "test to set intVal for a non eptf_variable which is handled in setValueHandler with non existing param"
|
| );
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List,
|
| pl_params := {{c_EPTF_CLL_DataSourceClient_Test_DSOwnerValueHandlerParam, "50"}},
|
| pl_ValueToSet := {integerlistVal := {9, 8, 7}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {integerlistVal := {}}, //indexList get back
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_setDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect,
|
| pl_testDescription := "test to set intListVal for an eptf_variable which is handled in setValueHandler with param"
|
| );
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List,
|
| pl_params := {{c_EPTF_CLL_DataSourceClient_Test_DSOwnerValueHandlerParam, "50"}},
|
| pl_indexList := {20, 30, 40, 90},
|
| pl_ValueToSet := {integerlistVal := {9, 8, 7}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {integerlistVal := {20, 30, 40, 90}}, //indexList get back
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_setDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect,
|
| pl_testDescription := "test to set intListVal for an eptf_variable which is handled in setValueHandler with indexlist"
|
| );
|
| }
|
|
|
| //negative tests for setDataValue_nonBlocking
|
| function f_EPTF_CLL_DataSource_Test_setDataValue_nonBlocking_negative() runs on EPTF_CLL_DataSource_Test_NonBlocking_CT {
|
|
|
| var EPTF_CLL_DataSource_Test_NonBlocking_Handler vl_handler := {dataValueHandler:=refers(f_EPTF_DataSourceTest_NonBlocking_setDataValue_getDataHandler)};
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_Value,
|
| pl_ValueToSet := {floatVal := 107.0},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_setDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect,
|
| pl_testDescription := "test to set intVal for a non eptf_variable which is handled in setValueHandler - negative: wrong value type"
|
| );
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := "invalid_source",
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_Value,
|
| pl_ValueToSet := {intVal := 107},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_setDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_Without_Effect,
|
| pl_testDescription := "test to set intVal for a non eptf_variable which is handled in setValueHandler - negative: invalid source"
|
| );
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_element := "invalid_element",
|
| pl_ValueToSet := {intVal := 107},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_setDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect,
|
| pl_testDescription := "test to set intVal for a non eptf_variable which is handled in setValueHandler - negative: invalid element"
|
| );
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List,
|
| pl_indexList := {-1, 3},
|
| pl_ValueToSet := {integerlistVal := {9, 8}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_setDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect,
|
| pl_testDescription := "test to set intListVal for an eptf_variable which is handled in setValueHandler but not in this case with indexlist - negative: negative index in indexlist"
|
| );
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List,
|
| pl_indexList := {1, 15},
|
| pl_ValueToSet := {integerlistVal := {9, 8}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_setDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect,
|
| pl_testDescription := "test to set intListVal for an eptf_variable which is handled in setValueHandler but not in this case with indexlist - negative: too big index in indexlist"
|
| );
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List,
|
| pl_indexList := {1, 2, 3},
|
| pl_ValueToSet := {integerlistVal := {9, 8}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_setDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect,
|
| pl_testDescription := "test to set intListVal for an eptf_variable which is handled in setValueHandler but not in this case with indexlist - negative: too many index in indexlist"
|
| );
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List,
|
| pl_indexList := {1},
|
| pl_ValueToSet := {integerlistVal := {9, 8}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Negative,
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_setDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect,
|
| pl_testDescription := "test to set intListVal for an eptf_variable which is handled in setValueHandler but not in this case with indexlist - negative: too few index in indexlist"
|
| );
|
|
|
| }
|
|
|
| //tests for setDataValue_nonBlocking for list values with indexList parameter
|
| function f_EPTF_CLL_DataSource_Test_setDataValue_nonBlocking_list_with_indexList() runs on EPTF_CLL_DataSource_Test_NonBlocking_CT {
|
|
|
| var EPTF_CLL_DataSource_Test_NonBlocking_Handler vl_handler := {dataValueHandler:=refers(f_EPTF_DataSourceTest_NonBlocking_setDataValue_getDataHandler)};
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List,
|
| pl_indexList := {1, 3},
|
| pl_ValueToSet := {integerlistVal := {9, 8}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {integerlistVal := {9, 8}},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_setDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect,
|
| pl_testDescription := "test to set intListVal for an eptf_variable which is handled in setValueHandler but not in this case with indexlist"
|
| );
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_ListString,
|
| pl_indexList := {1, 3},
|
| pl_ValueToSet := {charstringlistVal := {"messi", "cr"}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {charstringlistVal := {"messi", "cr"}},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_setDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect,
|
| pl_testDescription := "test to set charstringListVal for an eptf_variable which is not handled in setValueHandler with indexlist"
|
| );
|
|
|
| f_EPTF_DataSource_Test_NonBlocking_prepareAndCall(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_ListFloat,
|
| pl_indexList := {1, 3},
|
| pl_ValueToSet := {floatlistVal := {8.8, 7.7}},
|
| pl_handler := vl_handler,
|
| pl_positiveTest := c_Test_NonBlocking_Positive,
|
| pl_expectedValue := {floatlistVal := {8.8, 7.7}},
|
| pl_callable_func := c_Test_NonBlocking_Callable_Function_setDataValue,
|
| pl_nonBlockingEffect := c_Test_NonBlocking_With_NonBlocking_Effect,
|
| pl_testDescription := "test to set floatListVal for an eptf_variable which is not handled in setValueHandler with indexlist"
|
| );
|
| }
|
|
|
| }//group setDataValueNonBlocking
|
|
|
|
|
| group SameCheckDataNonBlocking {
|
|
|
| type component EPTF_DataSource_Test_SameCheckData_CT extends EPTF_DataSource_CT {
|
| var integer v_nofHandlerCalls := 0;
|
| var integer v_nofHandler2Calls := 0;
|
| }
|
|
|
| function f_EPTF_DataSource_Test_same_checkData_cleanup_CT() runs on EPTF_DataSource_Test_SameCheckData_CT {
|
| if (v_nofHandlerCalls!=2) {
|
| setverdict(fail, "f_EPTF_DataSource_Test_same_checkData_NonBlocking_handler was called ", v_nofHandlerCalls, " times. Should have been called 2 times");
|
| }
|
| if (v_nofHandler2Calls!=2) {
|
| setverdict(fail, "f_EPTF_DataSource_Test_same_checkData_NonBlocking_handler2 was called ", v_nofHandler2Calls, " times. Should have been called 2 times");
|
| }
|
| }
|
|
|
| function f_EPTF_DataSource_Test_same_checkData_NonBlocking_handler(
|
| in charstring pl_source,
|
| in charstring pl_ptcName, // response may fill this if it was ""
|
| in charstring pl_element,
|
| in EPTF_DataSource_Params pl_params,
|
| // reponse parameters:
|
| in integer pl_errorCode, // error code in the response
|
| in charstring pl_remoteDataVarName, // var name on the remote component
|
| in EPTF_Var_CT/*EPTF_DataSourceClient_CT*/ pl_ownerCompRef,// reference to the remote component
|
| in integer pl_localDataVarId, // var id on the local component (contains the current value, not subscribed to remote!)
|
| in EPTF_Var_DirectContent pl_dataValue, // the value of the data
|
| // user data
|
| in EPTF_IntegerList pl_userData // user specific data given at the request
|
| ) runs on EPTF_DataSource_Test_SameCheckData_CT {
|
|
|
| action("MyHandler called with: ",
|
| " pl_source: ", pl_source,
|
| ", pl_ptcName: ", pl_ptcName, // response may fill this if it was ""
|
| ", pl_element: ", pl_element,
|
| ", pl_params: ", pl_params,
|
| // reponse parameters:
|
| ", pl_errorCode: ", pl_errorCode, // error code in the response
|
| ", pl_remoteDataVarName: ", pl_remoteDataVarName, // var name on the remote component
|
| ", pl_ownerCompRef: ", pl_ownerCompRef,// reference to the remote component
|
| ", vl_localDataVarId: ", pl_localDataVarId, // var id on the local component (contains the current value, not subscribed to remote!)
|
| ", pl_dataValue: ", pl_dataValue, // the value of the data
|
| // user data
|
| ", pl_userData: ", pl_userData // user specific data given at the request
|
| );
|
|
|
| if (pl_userData == {3} and pl_element != c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName) {
|
| setverdict(fail, "handler called with incorrect element for userData ", pl_userData, ": ",pl_element,". Should be: ",c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName)
|
| }
|
| if (pl_userData == {4} and pl_element != c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2) {
|
| setverdict(fail, "handler called with incorrect element for userData ", pl_userData, ": ",pl_element,". Should be: ",c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2)
|
| }
|
|
|
| if (v_nofHandlerCalls==0 and pl_userData == {3}
|
| or v_nofHandlerCalls==1 and pl_userData == {4}) {
|
| v_nofHandlerCalls := v_nofHandlerCalls + 1;
|
| }
|
| }
|
|
|
| function f_EPTF_DataSource_Test_same_checkData_NonBlocking_handler2(
|
| in charstring pl_source,
|
| in charstring pl_ptcName, // response may fill this if it was ""
|
| in charstring pl_element,
|
| in EPTF_DataSource_Params pl_params,
|
| // reponse parameters:
|
| in integer pl_errorCode, // error code in the response
|
| in charstring pl_remoteDataVarName, // var name on the remote component
|
| in EPTF_Var_CT/*EPTF_DataSourceClient_CT*/ pl_ownerCompRef,// reference to the remote component
|
| in integer pl_localDataVarId, // var id on the local component (contains the current value, not subscribed to remote!)
|
| in EPTF_Var_DirectContent pl_dataValue, // the value of the data
|
| // user data
|
| in EPTF_IntegerList pl_userData // user specific data given at the request
|
| ) runs on EPTF_DataSource_Test_SameCheckData_CT {
|
|
|
| action("MyHandler2 called with: ",
|
| " pl_source: ", pl_source,
|
| ", pl_ptcName: ", pl_ptcName, // response may fill this if it was ""
|
| ", pl_element: ", pl_element,
|
| ", pl_params: ", pl_params,
|
| // reponse parameters:
|
| ", pl_errorCode: ", pl_errorCode, // error code in the response
|
| ", pl_remoteDataVarName: ", pl_remoteDataVarName, // var name on the remote component
|
| ", pl_ownerCompRef: ", pl_ownerCompRef,// reference to the remote component
|
| ", vl_localDataVarId: ", pl_localDataVarId, // var id on the local component (contains the current value, not subscribed to remote!)
|
| ", pl_dataValue: ", pl_dataValue, // the value of the data
|
| // user data
|
| ", pl_userData: ", pl_userData // user specific data given at the request
|
| );
|
|
|
| if (pl_userData != {1} and pl_userData != {2}) {
|
| setverdict(fail, "handler called with incorrect userdata: ", pl_userData, " should be: {1} or {2}")
|
| }
|
|
|
| // call getDataNonblocking to generate the same transaction id with different userdata:
|
| if (pl_userData == {2}) {
|
| var EPTF_IntegerList vl_userData := {4};
|
| f_EPTF_DataSource_getData_nonBlocking(
|
| pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
|
| pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2,
|
| pl_getDataHandler := {refers(f_EPTF_DataSource_Test_same_checkData_NonBlocking_handler), vl_userData}
|
| );
|
| }
|
|
|
| if (v_nofHandler2Calls==0 and pl_userData == {1}
|
| or v_nofHandler2Calls==1 and pl_userData == {2}) {
|
| v_nofHandler2Calls := v_nofHandler2Calls + 1;
|
| }
|
|
|
| }
|
|
|
| } // group SameCheckDataNonBlocking
|
|
|
|
|
| }//group NonBlockingTests
|
|
|
| } // group EPTF_CLL_DataSourceClient_Test
|
|
|
|
|
| group NonBlockingGetData_StopDuringBufferIsUsed {
|
|
|
| function f_EPTF_DataSourceClient_Test_StopDuringBufferIsUsed_behaviour(
|
| in charstring pl_selfName := "EPTF_CLL_DataSourceClient_Test",
|
| in charstring pl_dataSourceName,
|
| in EPTF_DataSource_CT pl_dataSourceCompRef,
|
| in float pl_executionTime := -1.0
|
| ) runs on EPTF_CLL_DataSource_Client_CT {
|
| f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_dataSourceCompRef);
|
| f_EPTF_DataSourceClient_registerData(
|
| pl_source := pl_dataSourceName,
|
| pl_ptcName := f_EPTF_Base_selfName(),
|
| pl_dataHandler := refers(f_EPTF_DataSourceClient_testIteratorHandler)
|
| );
|
| f_EPTF_DataSourceClient_registerCondition(c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName, f_EPTF_Base_selfName(), refers(f_EPTF_CLL_DataSourceClient_conditionHandler), c_EPTF_CLL_DataSourceClient_Test_DSOwnerMethodName);
|
| f_EPTF_DataSourceClient_registerCondition(c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName, f_EPTF_Base_selfName(), refers(f_EPTF_CLL_DataSourceClient_conditionHandler), c_EPTF_CLL_DataSourceClient_Test_DSOwnerMethod2Name);
|
| if (pl_executionTime<0.0) {
|
| f_EPTF_Base_wait4Shutdown();
|
| } else {
|
| timer t_execution := pl_executionTime;
|
| t_execution.start;
|
| t_execution.timeout;
|
| f_EPTF_Base_stop(none);
|
| }
|
| }
|
|
|
| function f_EPTF_DataSource_Test_StopDuringBufferIsUsed_getDataHandler(
|
| //request parameters:
|
| in charstring pl_source,
|
| in charstring pl_ptcName, // response may fill this if it was ""
|
| in charstring pl_element,
|
| in EPTF_DataSource_Params pl_params,
|
| // reponse parameters:
|
| in integer pl_errorCode, // error code in the response
|
| in charstring pl_remoteDataVarName, // var name on the remote component
|
| in EPTF_Var_CT/*EPTF_DataSourceClient_CT*/ pl_ownerCompRef,// reference to the remote component
|
| in integer vl_localDataVarId, // var id on the local component (contains the current value, not subscribed to remote!)
|
| in EPTF_Var_DirectContent pl_dataValue, // the value of the data
|
| // user data
|
| in EPTF_IntegerList pl_userData // user specific data given at the request
|
| ) runs on EPTF_Var_CT {
|
|
|
| action("MyHandler called with: ",
|
| " pl_source: ", pl_source,
|
| ", pl_ptcName: ", pl_ptcName, // response may fill this if it was ""
|
| ", pl_element: ", pl_element,
|
| ", pl_params: ", pl_params,
|
| // reponse parameters:
|
| ", pl_errorCode: ", pl_errorCode, // error code in the response
|
| ", pl_remoteDataVarName: ", pl_remoteDataVarName, // var name on the remote component
|
| ", pl_ownerCompRef: ", pl_ownerCompRef,// reference to the remote component
|
| ", vl_localDataVarId: ", vl_localDataVarId, // var id on the local component (contains the current value, not subscribed to remote!)
|
| ", pl_dataValue: ", pl_dataValue, // the value of the data
|
| // user data
|
| ", pl_userData: ", pl_userData // user specific data given at the request
|
| );
|
|
|
| if (sizeof(pl_userData)>=3) {
|
| var integer vl_clientId := pl_userData[0];
|
| var integer vl_currentIdx := pl_userData[1];
|
| var integer vl_failLimit := pl_userData[2];
|
|
|
| var integer vl_failLimit2 := 10000;
|
| if (sizeof(pl_userData)>=4) {
|
| vl_failLimit2 := pl_userData[3];
|
| }
|
|
|
| if (vl_currentIdx<vl_failLimit) {
|
| if (pl_errorCode!=0) {
|
| setverdict(fail, "Client did not exit but error code is non-zero. currentIDx:", vl_currentIdx, " failLimit: ", vl_failLimit);
|
| return;
|
| }
|
| } else if (vl_currentIdx>=vl_failLimit and vl_currentIdx<vl_failLimit2) {
|
| if (pl_errorCode==0) {
|
| setverdict(fail, "Client exited but error code is zero. currentIDx:", vl_currentIdx, " failLimit: ", vl_failLimit);
|
| return;
|
| }
|
| } else if (vl_currentIdx>=vl_failLimit2) {
|
| if (pl_errorCode!=0) {
|
| setverdict(fail, "Client did not exit but error code is non-zero. currentIDx:", vl_currentIdx, " failLimit2: ", vl_failLimit2);
|
| return;
|
| }
|
| }
|
|
|
| } else {
|
| if (pl_errorCode!=0) {
|
| setverdict(fail, "Client did not exit but error code is non-zero.");
|
| return;
|
| }
|
| }
|
|
|
| setverdict(pass, "Parameters in the handler are valid");
|
| }
|
|
|
| function f_EPTF_DataSource_Test_StopDuringBufferIsUsed_getConditionHandler(
|
| //request parameters:
|
| in charstring pl_source,
|
| in charstring pl_ptcName, // response may fill this if it was ""
|
| in charstring pl_element,
|
| in EPTF_DataSource_Params pl_params,
|
| // reponse parameters:
|
| in integer pl_errorCode, // error code in the response
|
| in charstring pl_remoteDataVarName, // var name on the remote component
|
| in EPTF_Var_CT/*EPTF_DataSourceClient_CT*/ pl_ownerCompRef,// reference to the remote component
|
| in integer vl_localDataVarId, // var id on the local component (contains the current value, not subscribed to remote!)
|
| in EPTF_Var_DirectContent pl_dataValue, // the value of the data
|
| // user data
|
| in EPTF_IntegerList pl_userData // user specific data given at the request
|
| ) runs on EPTF_Var_CT {
|
| //pl_userData[0] should be the same as sizeof(pl_params)
|
| //pl_userData[1]: if specified and it is -1: it means negative test, pl_errorCode should be nonzero.
|
| var boolean vl_negativeTest := sizeof(pl_userData)>1 and pl_userData[1]==-1;
|
|
|
| action("MyHandler called with: ",
|
| " pl_source: ", pl_source,
|
| ", pl_ptcName: ", pl_ptcName, // response may fill this if it was ""
|
| ", pl_element: ", pl_element,
|
| ", pl_params: ", pl_params,
|
| // reponse parameters:
|
| ", pl_errorCode: ", pl_errorCode, // error code in the response
|
| ", pl_remoteDataVarName: ", pl_remoteDataVarName, // var name on the remote component
|
| ", pl_ownerCompRef: ", pl_ownerCompRef,// reference to the remote component
|
| ", vl_localDataVarId: ", vl_localDataVarId, // var id on the local component (contains the current value, not subscribed to remote!)
|
| ", pl_dataValue: ", pl_dataValue, // the value of the data
|
| // user data
|
| ", pl_userData: ", pl_userData // user specific data given at the request
|
| );
|
|
|
| if (sizeof(pl_userData)>=3) {
|
| var integer vl_clientId := pl_userData[0];
|
| var integer vl_currentIdx := pl_userData[1];
|
| var integer vl_failLimit := pl_userData[2];
|
|
|
| var integer vl_failLimit2 := 10000;
|
| if (sizeof(pl_userData)>=4) {
|
| vl_failLimit2 := pl_userData[3];
|
| }
|
|
|
| if (vl_currentIdx<vl_failLimit) {
|
| if (pl_errorCode!=0) {
|
| setverdict(fail, "Client did not exit but error code is non-zero. currentIDx:", vl_currentIdx, " failLimit: ", vl_failLimit);
|
| return;
|
| }
|
| } else if (vl_currentIdx>=vl_failLimit and vl_currentIdx<vl_failLimit2) {
|
| if (pl_errorCode==0) {
|
| setverdict(fail, "Client exited but error code is zero. currentIDx:", vl_currentIdx, " failLimit: ", vl_failLimit);
|
| return;
|
| }
|
| } else if (vl_currentIdx>=vl_failLimit2) {
|
| if (pl_errorCode!=0) {
|
| setverdict(fail, "Client did not exit but error code is non-zero. currentIDx:", vl_currentIdx, " failLimit2: ", vl_failLimit2);
|
| return;
|
| }
|
| }
|
|
|
| } else {
|
| if (pl_errorCode!=0) {
|
| setverdict(fail, "Client did not exit but error code is non-zero.");
|
| return;
|
| }
|
| }
|
|
|
| setverdict(pass, "Parameters in the handler are valid");
|
| }
|
|
|
| } // group NonBlockingGetData_StopDuringBufferIsUsed
|
|
|
|
|
| }//end of module
|