internal StepType SetRelayOutputStateTest(out SoapException ex, out int Timeout, string RelayOutputToken, RelayLogicalState LogicalState) { StepType res = StepType.None; Timeout = 0; ex = null; bool passed = true; string logMessage = ""; //Get step list for command XmlNodeList m_testList = TestCommon.GetStepsForCommand("DeviceIO10.SetRelayOutputState"); if (m_testList != null) { //Get current step XmlNode test = m_testList[m_commandCount[SetRelayOutputState]]; #region Analize request //RelayOutputToken if (CommonCompare.IgnoreCheck("RequestParameters/RelayOutputToken", test)) { logMessage = logMessage + " RelayOutputToken = " + RelayOutputToken + "; "; } else { CommonCompare.StringCompare("RequestParameters/RelayOutputToken", "RelayOutputToken", RelayOutputToken, ref logMessage, ref passed, test); } //LogicalState CommonCompare.StringCompare("RequestParameters/LogicalState", "LogicalState", LogicalState.ToString(), ref logMessage, ref passed, test); #endregion //Analize request //Generate response res = TestCommon.GenerateResponseStepTypeVoid(test, out ex, out Timeout); string typeRes = test.SelectNodes("Response")[0].InnerText; //Log message TestCommon.writeToLog(test, logMessage, passed); Increment(m_testList.Count, SetRelayOutputState); } else { res = StepType.None; Timeout = 0; ex = null; res = StepType.None; } return(res); }
internal StepType SetRelayOutputSettingsTest(out SoapException ex, out int Timeout, RelayOutput RelayOutput) { StepType res = StepType.None; Timeout = 0; ex = null; bool passed = true; string logMessage = ""; //Get step list for command XmlNodeList m_testList = TestCommon.GetStepsForCommand("DeviceIO10.SetRelayOutputSettings"); if (m_testList != null) { //Get current step XmlNode test = m_testList[m_commandCount[SetRelayOutputSettings]]; #region Analize request //RelayOutput CommonCompare.Exist("RequestParameters/RelayOutputToken", "RelayOutput", RelayOutput, ref logMessage, ref passed, test); if (passed) { //RelayOutputToken if (CommonCompare.IgnoreCheck("RequestParameters/RelayOutputToken", test)) { logMessage = logMessage + " RelayOutputToken = " + RelayOutput.token + "; "; } else { CommonCompare.StringCompare("RequestParameters/RelayOutputToken", "RelayOutputToken", RelayOutput.token, ref logMessage, ref passed, test); } //Properties if (RelayOutput.Properties != null) { //Mode CommonCompare.StringCompare("RequestParameters/Properties/Mode", "Properties.Mode", RelayOutput.Properties.Mode.ToString(), ref logMessage, ref passed, test); //DelayTime CommonCompare.StringCompare("RequestParameters/Properties/DelayTime", "Properties.DelayTime", RelayOutput.Properties.DelayTime, ref logMessage, ref passed, test); //IdleState CommonCompare.StringCompare("RequestParameters/Properties/IdleState", "Properties.IdleState", RelayOutput.Properties.IdleState.ToString(), ref logMessage, ref passed, test); } else { passed = false; logMessage = logMessage + "No required tag Properties."; } } #endregion //Analize request //Generate response res = TestCommon.GenerateResponseStepTypeVoid(test, out ex, out Timeout); string typeRes = test.SelectNodes("Response")[0].InnerText; //Log message TestCommon.writeToLog(test, logMessage, passed); Increment(m_testList.Count, SetRelayOutputSettings); } else { res = StepType.None; Timeout = 0; ex = null; res = StepType.None; } return(res); }