public void SoapUICreateCopyTest() { //Arrange ActSoapUI actSoapUI = new ActSoapUI(); actSoapUI.Description = "Soap Wrapper acttion test "; var xmlFilePath = TestResources.GetTestResourcesFile(@"XML\calculator_soapui_project.xml"); actSoapUI.AddOrUpdateInputParamValue(ActSoapUI.Fields.ImportFile, xmlFilePath); actSoapUI.GetOrCreateInputParam(ActSoapUI.Fields.UIrelated, "False"); actSoapUI.GetOrCreateInputParam(ActSoapUI.Fields.ImportFile, "True"); actSoapUI.GetOrCreateInputParam(ActSoapUI.Fields.IgnoreValidation, "False"); actSoapUI.GetOrCreateInputParam(ActSoapUI.Fields.TestCasePropertiesRequiered, "False"); actSoapUI.GetOrCreateInputParam(ActSoapUI.Fields.AddXMLResponse, "False"); actSoapUI.GetOrCreateInputParam(ActSoapUI.Fields.TestCasePropertiesRequieredControlEnabled, "False"); //Act var duplicateAct = (ActSoapUI)actSoapUI.CreateCopy(true); //Assert Assert.AreEqual(actSoapUI.ActInputValues.Count, duplicateAct.ActInputValues.Count); Assert.AreEqual(actSoapUI.ActInputValues[1].Value.ToString(), duplicateAct.ActInputValues[1].Value.ToString()); }
public void WebServices_SoapWrapperActionTest() { WebServicesDriver mDriver = new WebServicesDriver(mBF); Agent wsAgent = new Agent(); AgentOperations agentOperations = new AgentOperations(wsAgent); wsAgent.AgentOperations = agentOperations; wsAgent.DriverType = Agent.eDriverType.WebServices; ((AgentOperations)wsAgent.AgentOperations).Driver = mDriver; ApplicationAgent mAG = new ApplicationAgent(); mAG.Agent = wsAgent; mGR = new GingerRunner(); mGR.Executor = new GingerExecutionEngine(mGR); ((GingerExecutionEngine)mGR.Executor).SolutionAgents = new ObservableList <Agent>(); ((GingerExecutionEngine)mGR.Executor).SolutionAgents.Add(wsAgent); mGR.Executor.BusinessFlows.Add(mBF); Activity Activity2 = new Activity(); Activity2.Active = true; Activity2.ActivityName = "Soap UI Wrapper action"; Activity2.CurrentAgent = wsAgent; mBF.Activities.Add(Activity2); ActSoapUI actSoapUi = new ActSoapUI(); var xmlFilePath = TestResources.GetTestResourcesFile(@"XML" + Path.DirectorySeparatorChar + "calculator_soapui_project.xml"); actSoapUi.AddNewReturnParams = true; actSoapUi.AddOrUpdateInputParamValue(ActSoapUI.Fields.ImportFile, xmlFilePath); mBF.Activities[0].Acts.Add(actSoapUi); Assert.AreEqual(1, actSoapUi.ActInputValues.Count); Assert.AreEqual(xmlFilePath, actSoapUi.ActInputValues[0].Value.ToString()); }