当前位置: 首页>>代码示例>>C#>>正文


C# XMLParameter.AddParameter方法代码示例

本文整理汇总了C#中PAS.AutoTest.PasATCore.XMLParameter.AddParameter方法的典型用法代码示例。如果您正苦于以下问题:C# XMLParameter.AddParameter方法的具体用法?C# XMLParameter.AddParameter怎么用?C# XMLParameter.AddParameter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PAS.AutoTest.PasATCore.XMLParameter的用法示例。


在下文中一共展示了XMLParameter.AddParameter方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Run_Patient_CreatePatient_Exception_Case62

        //Case 62: 1.3.1_CreatePatient_Exception
        public void Run_Patient_CreatePatient_Exception_Case62()
        {
            int runCount = 0;

            foreach (InputDataSet ids in this.Input.DataSets)
            {
                runCount++;
                Round r = this.NewRound(runCount.ToString(), "Create patient");

                CheckPoint pCreate = new CheckPoint("Create Patient", "Test description");
                r.CheckPoints.Add(pCreate);
                PatientService ps = new PatientService();
                XMLParameter pa = new XMLParameter("patient");
                for (int i = 0; i < ids.InputParameters.Count; i++)
                {
                    if (ids.InputParameters.GetParameter(i).Step == "create")
                        pa.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value);
                }
                XMLResult result = ps.createPatient(pa);
                if (result.IsErrorOccured)
                {
                    pCreate.Result = TestResult.Pass;
                    pCreate.Outputs.AddParameter("That's ok to create patient error:", "Create Patient", result.Message);
                }
                else
                {
                    pCreate.Result = TestResult.Fail;
                    pCreate.Outputs.AddParameter("Expect create patient error, but it is succusss", "Create Patient", result.Message);
                }
                SaveRound(r);
            }

            Output();
        }
开发者ID:Manivannan-ezhumalai,项目名称:AutomationTestFramework,代码行数:35,代码来源:Patient.cs

示例2: Run_Analysis_Acq_CreateAnalysis_Normal_Case47

        //Case 47: 1.3.12_CreateAnalysis_Normal
        public void Run_Analysis_Acq_CreateAnalysis_Normal_Case47()
        {
            int runCount = 0;
            string analysisContent = "<trophy type=\"analysis\" version=\"1.0\">          <trophyheader>        <accesslog>            <creation date=\"2011-10-25\" time=\"10:54:17\" applicationname=\"kdis2dviewer\" applicationversion=\"7.0\" />            <modification date=\"2011/10/25\" time=\"10:54:18\" applicationname=\"kdis2dviewer\" applicationversion=\"7.0\" />        </accesslog>    </trophyheader>    <templateheader>        <object subtype=\"analysis\" instance=\"true\" name=\"Test Analysis\" uid=\"\" />        <comments />        <icon filepath=\"analysisicon.jpg\" />        <icon>            <ObjectData>base64imagedata</ObjectData>        </icon>        <icon id=\"thumbnailid\" />        <AnalysisProp name=\"1112222\" comments=\"\" date=\"2011-10-25\" time=\"10:54:17\" arrangementmode=\"0\" />    </templateheader>    <page index=\"0\" Dx=\"1280\" Dy=\"1024\" backgroundColour=\"RGB(0,0,0)\">        <Frame index=\"1\" type=\"floating panel\" x=\"938\" y=\"201\" w=\"200\" h=\"239\" Zorder=\"\">            <PanelProp paneltype=\"control panel xray\" id=\"control panel xray\" showstate=\"maximized\" />        </Frame>        <Frame index=\"2\" type=\"floating panel\" x=\"938\" y=\"201\" w=\"200\" h=\"240\" Zorder=\"\">            <PanelProp paneltype=\"control panel color\" id=\"control panel color\" showstate=\"maximized\" />        </Frame>        <Frame index=\"3\" type=\"image\" x=\"349\" y=\"299\" w=\"266\" h=\"355\" Zorder=\"\">            <PanelProp paneltype=\"image\" id=\"@@PSID0\" showstate=\"selected\" IdV0=\"76b3ec9d-1374-4a13-9950-6cf3f5ebc1e6\" />        </Frame>        <Frame index=\"4\" type=\"image\" x=\"818\" y=\"299\" w=\"266\" h=\"354\" Zorder=\"\">            <PanelProp paneltype=\"image\" id=\"@@PSID1\" showstate=\"deselected\" IdV0=\"eb87d761-accf-4531-b4fc-9ee9861f15fd\" />        </Frame>    </page></trophy>";

            foreach (InputDataSet ids in this.Input.DataSets)
            {
                Round r = this.NewRound(runCount.ToString(), "Acquisition for Analysis");

                CheckPoint pAnalysis = new CheckPoint("Create Analysis", "Create Analysis");
                r.CheckPoints.Add(pAnalysis);

                XMLParameter acq = new XMLParameter("acq_info");
                string PatientID = string.Empty;
                for (int i = 0; i < ids.InputParameters.Count; i++)
                {
                    if (ids.InputParameters.GetParameter(i).Step == "acquire")
                    {
                        if (ids.InputParameters.GetParameter(i).Key == "patient_internal_id")
                            PatientID = ids.InputParameters.GetParameter(i).Value;
                        acq.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value);
                    }
                }
                string retPsID = string.Empty;
                string repStr = "@@PSID";
                XMLParameterCollection anaUidsXML = new XMLParameterCollection();
                XMLParameter anaUids = new XMLParameter("presentationstate");

                for (int acqTime = 0; acqTime < 2; acqTime++)
                {
                    retPsID = AcquisitionService.AcquireImage(acq);
                    if (retPsID != string.Empty)
                    {
                        analysisContent = analysisContent.Replace(repStr + acqTime, retPsID);
                        anaUids.AddParameter("internal_id", retPsID);
                    }
                }
                anaUidsXML.Add(anaUids);
                AnalysisService ass = new AnalysisService();

                XMLResult rslCreateAnalysis = ass.createAnalysis(analysisContent, false, true, PatientID, @"D:\Test\DICOM_Imag_Lib\ImportImage\thumb.PNG", anaUidsXML);

                if (rslCreateAnalysis.IsErrorOccured)
                {
                    pAnalysis.Result = TestResult.Fail;
                    pAnalysis.Outputs.AddParameter("Create Analysis", "Analysis Service", rslCreateAnalysis.Message);
                }
                else
                {
                    pAnalysis.Result = TestResult.Pass;
                    pAnalysis.Outputs.AddParameter("Create Analysis ID:", "Analysis Service", rslCreateAnalysis.SingleResult);
                }
                ass.deleteAnalysis(rslCreateAnalysis.SingleResult);
                SaveRound(r);
            }
            Output();
        }
开发者ID:Manivannan-ezhumalai,项目名称:AutomationTestFramework,代码行数:58,代码来源:Analysis.cs

示例3: Utility_CreatePatientForSpecificCase

        /// <summary>
        /// Utility_s the create patient for specific case.
        /// </summary>
        /// <param name="caseID">The case ID.</param>
        /// <returns>The patien ID</returns>
        public static string Utility_CreatePatientForSpecificCase(string caseID)
        {
            string patientUID = null;

            PatientService ps = new PatientService();
            XMLParameter pa = new XMLParameter("patient");

            pa.AddParameter("first_name", caseID);
            pa.AddParameter("last_name", caseID);
            pa.AddParameter("middle_name", caseID);

            XMLResult result = ps.createPatient(pa);

            if (!result.IsErrorOccured)
            {
                patientUID = result.SingleResult;
            }

            return patientUID;
        }
开发者ID:Manivannan-ezhumalai,项目名称:AutomationTestFramework,代码行数:25,代码来源:PatientService.cs

示例4: Run_Patient_CreatePatient_Normal_Case139

        //Case 139: 1.2.1_CreatePatient_Normal
        public void Run_Patient_CreatePatient_Normal_Case139()
        {
            int runCount = 0;
            foreach (InputDataSet ids in this.Input.DataSets)
            {
                runCount++;
                Round r = this.NewRound(runCount.ToString(), "Create patient");

                CheckPoint pCreate = new CheckPoint("Create Patient", "Test description");
                r.CheckPoints.Add(pCreate);
                PatientService ps = new PatientService();
                XMLParameter pa = new XMLParameter("patient");
                for (int i = 0; i < ids.InputParameters.Count; i++)
                {
                    if (ids.InputParameters.GetParameter(i).Step == "create")
                        pa.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value);
                }
                XMLResult result = ps.createPatient(pa);
                if (result.IsErrorOccured)
                {
                    pCreate.Result = TestResult.Fail;
                    pCreate.Outputs.AddParameter("Create error:", "Create Patient", result.Message);
                }
                else
                {

                    pCreate.Outputs.AddParameter("Patient ID:", "Create Patient", result.SingleResult);

                    XMLResult getPatient = ps.getPatient(result.SingleResult);
                    if (getPatient.IsErrorOccured)
                    {
                        pCreate.Result = TestResult.Fail;
                        pCreate.Outputs.AddParameter("Get created patient fail", "Get Patient", getPatient.ResultContent);
                    }
                    else
                    {
                        pCreate.Outputs.AddParameter("Get created patient OK", "Get Patient", getPatient.ResultContent);
                        XMLResult delPatient = ps.deletePatient(result.SingleResult);
                        if (delPatient.IsErrorOccured)
                        {
                            pCreate.Result = TestResult.Fail;
                            pCreate.Outputs.AddParameter("Delete created patient fail", "Delete Patient", delPatient.ResultContent);
                        }
                        else
                        {
                            pCreate.Outputs.AddParameter("Delete created patient OK", "Delete Patient", delPatient.ResultContent);
                            pCreate.Result = TestResult.Pass;
                        }
                    }
                }
                SaveRound(r);
            }
            Output();
        }
开发者ID:Manivannan-ezhumalai,项目名称:AutomationTestFramework,代码行数:55,代码来源:Patient.cs

示例5: Run

        public void Run()
        {
            Round r = this.NewRound("R1","Test round");

            CheckPoint p = new CheckPoint("Create Patient", "Test description");

            r.CheckPoints.Add(p);

            PatientService ps = new PatientService();

            XMLParameter pa = new XMLParameter("patient");
            pa.AddParameter(r.DataSet.InputParameters.GetParameter("dafsd").Value, "pid888");
            pa.AddParameter("dpmsid", "dpmsid888");
            pa.AddParameter("firstname", "Test");
            pa.AddParameter("lastname", "Test");
            pa.AddParameter("sex", "male");

            XMLResult result= ps.createPatient(pa);

            if (result.IsErrorOccured)
            {
                p.Result = TestResult.Fail;
                p.Outputs.AddParameter("Error", result.Message);
            }
            else
            {
                p.Result = TestResult.Pass;
                p.Outputs.AddParameter("New patient Id", result.SingleResult);
            }

            SaveRound(r);

            Output();

            System.Windows.Forms.MessageBox.Show("Done");
        }
开发者ID:Erkan-Yilmaz,项目名称:AutomationTestFramework,代码行数:36,代码来源:Test.cs

示例6: Run_Patient_ListObjects_LogiconTagForImage_Case1643

        // Case 1643: 1.1.03.12_List Objects - N10 - tag for image with logicon report
        public void Run_Patient_ListObjects_LogiconTagForImage_Case1643()
        {
            int runCount = 0;

            PatientService oldPatientSvc = new PatientService();
            ImportService ims = new ImportService();
            NewPatientService patientSvc = new NewPatientService();
            PatientListObjectsRequestType pListObjects = new PatientListObjectsRequestType();
            PatientListObjectsResponseType rtListObjects = new PatientListObjectsResponseType();
            PatientListObjectsResponseType rtListObjectsAfterProcess = new PatientListObjectsResponseType();

            foreach (InputDataSet ids in this.Input.DataSets)
            {
                runCount++;
                Round r = this.NewRound(runCount.ToString(), ids.Description);

                try
                {
                    #region Initialize test data
                    XMLParameter pCreatePatient = new XMLParameter("patient");
                    string patientID = string.Empty;
                    string filePath = string.Empty;
                    string archivePath = string.Empty;
                    string imageID = string.Empty;
                    for (int i = 0; i < ids.InputParameters.Count; i++)
                    {
                        if (ids.InputParameters.GetParameter(i).Step == "createPatient")
                        {
                            pCreatePatient.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value);
                        }
                        else if (ids.InputParameters.GetParameter(i).Step == "import")
                        {
                            if (ids.InputParameters.GetParameter(i).Key == "filePath")
                            {
                                filePath = ids.InputParameters.GetParameter(i).Value;
                            }
                            else if (ids.InputParameters.GetParameter(i).Key == "archivePath")
                            {
                                archivePath = ids.InputParameters.GetParameter(i).Value;
                            }
                        }
                    }

                    string tagBeforeProcess = null;
                    string tagAfterProcess = null;
                    for (int i = 0; i < ids.ExpectedValues.Count; i++)
                    {
                        if (ids.ExpectedValues.GetParameter(i).Step == "listObjectsBeforeProcess")
                        {
                            tagBeforeProcess = ids.ExpectedValues.GetParameter(i).Value;
                        }
                        else if (ids.ExpectedValues.GetParameter(i).Step == "listObjectsAfterProcess")
                        {
                            tagAfterProcess = ids.ExpectedValues.GetParameter(i).Value;
                        }
                    }
                    #endregion

                    #region Step: Create a patient
                    CheckPoint cpCreate = new CheckPoint("Create Patient", "Create Patient");
                    r.CheckPoints.Add(cpCreate);

                    XMLResult rtCreatePatient = oldPatientSvc.createPatient(pCreatePatient);
                    if (rtCreatePatient.IsErrorOccured)
                    {
                        cpCreate.Result = TestResult.Fail;
                        cpCreate.Outputs.AddParameter("Create returns error:", "Create Patient", rtCreatePatient.Message);
                        SaveRound(r);
                        continue;
                    }
                    else
                    {
                        patientID = rtCreatePatient.SingleResult;
                        pListObjects.patientInternalId = patientID;
                        pListObjects.current = true;
                        pListObjects.currentSpecified = true;
                        cpCreate.Outputs.AddParameter("Patient ID:", "Create Patient", rtCreatePatient.SingleResult);
                        cpCreate.Result = TestResult.Pass;
                    }
                    #endregion

                    #region Step: Prepare a RVG image
                    CheckPoint cpImport = new CheckPoint("Import Image", "Test import");
                    r.CheckPoints.Add(cpImport);

                    XMLResult rtlImport = ims.importObject(patientID, "", filePath, archivePath, false, "false");
                    if (rtlImport.IsErrorOccured)
                    {
                        cpImport.Result = TestResult.Fail;
                        cpImport.Outputs.AddParameter("import", "Import image fail", rtlImport.ResultContent);
                    }
                    else
                    {
                        cpImport.Result = TestResult.Pass;
                        cpImport.Outputs.AddParameter("import", "Import image OK", rtlImport.ResultContent);
                        imageID = rtlImport.SingleResult;
                    }
                    #endregion

//.........这里部分代码省略.........
开发者ID:Manivannan-ezhumalai,项目名称:AutomationTestFramework,代码行数:101,代码来源:Patient.cs

示例7: Run_WorkFlow_ImportCeph_RadioLog_Case1043

        //Case 1043: 1.3.17_workflow_ImportCeph_GetImageInfo_RadilogIsNotSaved
        public void Run_WorkFlow_ImportCeph_RadioLog_Case1043()
        {
            int runCount = 0;
            string patientUID = string.Empty;
            bool isCreatePatient = false;
            bool isDeletePatient = true;
            foreach (InputDataSet ids in this.Input.DataSets)
            {
                isCreatePatient = false;
                runCount++;
                Round r = this.NewRound(runCount.ToString(), "Import image");

                PatientService patientSvc = new PatientService();
                ImportService importSvc = new ImportService();
                ImageService imageSvc = new ImageService();

                string radioLogBeforeImport = string.Empty;
                string radioLogAfterImport = string.Empty;
                string imageID = null;

                XMLParameter pa = new XMLParameter("patient");
                XMLParameter ia = new XMLParameter("import");
                for (int i = 0; i < ids.InputParameters.Count; i++)
                {
                    if (ids.InputParameters.GetParameter(i).Step == "create")
                    {
                        pa.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value);
                        isCreatePatient = true;
                    }
                    if (ids.InputParameters.GetParameter(i).Step == "import")
                    {
                        ia.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value);
                    }
                }

                XMLParameter epGetImagInfo = new XMLParameter();
                for (int i = 0; i < ids.ExpectedValues.Count; i++)
                {
                    if (ids.ExpectedValues.GetParameter(i).Step == "getImageInfo")
                    {
                        epGetImagInfo.AddParameter(ids.ExpectedValues.GetParameter(i).Key, ids.ExpectedValues.GetParameter(i).Value);
                    }
                }

                try
                {
                    #region Step1: Create Image
                    if (isCreatePatient)
                    {
                        CheckPoint pCreate = new CheckPoint("Create Patient", "Test create");
                        r.CheckPoints.Add(pCreate);

                        XMLResult rtCreatePatient = patientSvc.createPatient(pa);
                        if (!rtCreatePatient.IsErrorOccured)
                        {
                            patientUID = rtCreatePatient.SingleResult;
                            pCreate.Outputs.AddParameter("Create patient UID", "Create Patient", patientUID);
                            pCreate.Result = TestResult.Pass;
                        }
                    }
                    #endregion

                    #region Step2: Get patient radio log info before import
                    CheckPoint cpGetPatientBeforeImport = new CheckPoint("GetPatient", "Get Patient Info before import image");
                    r.CheckPoints.Add(cpGetPatientBeforeImport);

                    XMLResult rtGetPatientBeforeImport = patientSvc.getPatient(patientUID);
                    if (rtGetPatientBeforeImport.IsErrorOccured)
                    {
                        cpGetPatientBeforeImport.Result = TestResult.Fail;
                        cpGetPatientBeforeImport.Outputs.AddParameter("Get Patient Info before import image returns error", "GetPatient", rtGetPatientBeforeImport.ResultContent);
                    }
                    else
                    {
                        cpGetPatientBeforeImport.Result = TestResult.Pass;
                        cpGetPatientBeforeImport.Outputs.AddParameter("Get Patient Info before import image returns ok", "GetPatient", rtGetPatientBeforeImport.ResultContent);

                        radioLogBeforeImport = rtGetPatientBeforeImport.MultiResults[0].GetParameterValueByName("cumulative_dose");  //get the cumulative_dose info
                    }
                    #endregion

                    #region Step3: Import Image
                    CheckPoint pImport = new CheckPoint("Import Image", "Test import");
                    r.CheckPoints.Add(pImport);

                    string filePath = string.Empty;
                    string archivePath = string.Empty;
                    bool move = false;
                    for (int c = 0; c < ia.Length; c++)
                    {
                        if (ia.GetParameterName(c) == "path")
                        {
                            filePath = ia.GetParameterValue(c);
                        }
                        else if (ia.GetParameterName(c) == "archivePath")
                        {
                            archivePath = ia.GetParameterValue(c);
                        }
                        else if (ia.GetParameterName(c) == "move")
//.........这里部分代码省略.........
开发者ID:Manivannan-ezhumalai,项目名称:AutomationTestFramework,代码行数:101,代码来源:WorkFlow.cs

示例8: Run_PS_Acq_GetPSInfo_Case1089

        //Case 1089: 1.3.7_GetPresentationStateInfo_N07_Acq image and then check the DICOM info value is correct in getPSInfo return
        public void Run_PS_Acq_GetPSInfo_Case1089()
        {
            int runCount = 0;
            foreach (InputDataSet ids in this.Input.DataSets)
            {
                runCount++;
                Round r = this.NewRound(runCount.ToString(), "Acquisition");
                AcquisitionService acqs = new AcquisitionService();
                PresentationStateService pss = new PresentationStateService();

                XMLParameter acq = new XMLParameter("acq_info");
                XMLParameter psa = new XMLParameter("presentationstate");

                XMLParameterCollection psaCollection = new XMLParameterCollection();

                for (int i = 0; i < ids.InputParameters.Count; i++)
                {
                    if (ids.InputParameters.GetParameter(i).Step == "acquire")
                    {
                        acq.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value);
                    }
                }

                CheckPoint pAcquire = new CheckPoint("Acquire Image", "Acquisition RVG");
                r.CheckPoints.Add(pAcquire);
                System.Diagnostics.Debug.Print("Acquire start");

                XMLResult rslAcqRVG = acqs.startAcquisition(acq);
                System.Threading.Thread.Sleep(3000);
                if (rslAcqRVG.IsErrorOccured)
                {
                    System.Diagnostics.Debug.Print("Acquire fail:");
                    pAcquire.Result = TestResult.Fail;
                    pAcquire.Outputs.AddParameter("Acquire image error", "startAcquisition", rslAcqRVG.Message);
                }
                else
                {
                    pAcquire.Outputs.AddParameter("Acquire session ID", "startAcquisition", rslAcqRVG.SingleResult);
                    int DORVGcount = 0;
                    XMLResult getAcqRVG = new XMLResult();
                    do
                    {
                        System.Threading.Thread.Sleep(3000);
                        System.Diagnostics.Debug.Print("get acquire in do");
                        DORVGcount++;
                        getAcqRVG = acqs.getAcquisitionResult(rslAcqRVG.SingleResult);
                        if (!getAcqRVG.IsErrorOccured)
                        {
                            string psUid = string.Empty;

                            ParseXMLContent parser = new ParseXMLContent(getAcqRVG.ResultContent); // To parse the return XML

                            string imageID = parser.getStringWithPathAndType("trophy/object_info", "image", "value");
                            string[] imageIDs = imageID.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
                            int imageCount = imageIDs.Length;

                            string psID = parser.getStringWithPathAndType("trophy/object_info", "presentation_state", "value");
                            string[] psIDs = psID.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
                            int psCount = psIDs.Length;

                            if (imageCount == 1 && psCount == 1)
                            {
                                pAcquire.Result = TestResult.Pass;
                                pAcquire.Outputs.AddParameter("getAcquisitionResult", "Acquisition", getAcqRVG.ResultContent);

                                psUid = psIDs[0];

                                psa.AddParameter("internal_id", psUid);
                                XMLParameter psPreferences = new XMLParameter("preferences");
                                psaCollection.Add(psa);
                                psaCollection.Add(psPreferences);

                                XMLResult psinforeturn = pss.getPresentationStateInfo(psaCollection);

                                CheckPoint pGetPSinfo = new CheckPoint("Get Presentation State", "PS Desc");
                                r.CheckPoints.Add(pGetPSinfo);
                                for (int findvalue = 0; findvalue < psinforeturn.DicomArrayResult.Length; findvalue++)
                                {
                                    XMLParameterNode psnode = psinforeturn.DicomArrayResult.Parameters[findvalue];
                                    if (psnode.ParameterName == "acquired" && psnode.ParameterValue == "true")
                                    {
                                        pGetPSinfo.Result = TestResult.Pass;
                                        pGetPSinfo.Outputs.AddParameter("get presentation state", "get presentation state info as expect", "The acquired node value is true for newly acq image");
                                        break;
                                    }
                                }
                                if (pGetPSinfo.Result != TestResult.Pass)
                                {
                                    pGetPSinfo.Result = TestResult.Fail;
                                    pGetPSinfo.Outputs.AddParameter("get presentation state", "get presentation state info not as expect", "The acquired node value is NOT true for newly acq image. Actually get: " + psinforeturn.ResultContent);
                                }
                            }
                            else
                            {
                                pAcquire.Result = TestResult.Fail;
                                pAcquire.Outputs.AddParameter("getAcquisitionResult", "Acquisition", "Wrong return XML: " + getAcqRVG.ResultContent);
                            }

                            break; // The test case is finished, end the "do" loop
//.........这里部分代码省略.........
开发者ID:Manivannan-ezhumalai,项目名称:AutomationTestFramework,代码行数:101,代码来源:PresentationState.cs

示例9: Run_PS_Acq_Radiolog_Case1091

        //Case 1091: 1.3.7_WorkFlow_AcquireRVG+SetImageInfo+GetPresentationStateInfo_RadioLogInformation
        public void Run_PS_Acq_Radiolog_Case1091()
        {
            //int runCount = this.Input.Repetition;

            int runCount = 0; // this is the initial run count. Use this count to repeat different test data set.

            foreach (InputDataSet ids in this.Input.DataSets)
            {
                runCount++;
                Round r = this.NewRound(runCount.ToString(), "Test round");

                //Mark the check point here to indicate what's the check point here
                CheckPoint p1 = new CheckPoint("createPatient", "Setup environment of createPatient");
                CheckPoint p2 = new CheckPoint("startAcquisition", "Setup environment of acquisition");
                CheckPoint p3 = new CheckPoint("getAcquisitionResult", "Setup environment of image and PS id");
                CheckPoint p4 = new CheckPoint("setImageInfo", "Setup environment of setImageInfo");
                CheckPoint p5 = new CheckPoint("getImageInfo", "Test getImageInfo");
                CheckPoint p6 = new CheckPoint("getPresentationStateInfo", "Test getPresentationStateInfo");

                r.CheckPoints.Add(p1);
                r.CheckPoints.Add(p2);
                r.CheckPoints.Add(p3);
                r.CheckPoints.Add(p4);
                r.CheckPoints.Add(p5);
                r.CheckPoints.Add(p6);

                //create required PAS service instaces here
                PatientService pats = new PatientService();
                AcquisitionService acq = new AcquisitionService();
                ImageService img = new ImageService();
                PresentationStateService ps = new PresentationStateService();

                //create input parameters here, it may include XML path type and string type value
                XMLParameter pa1 = new XMLParameter("patient");
                XMLParameter pa2 = new XMLParameter("acq_info");
                XMLParameter pa3 = new XMLParameter("getAcquisitionResult");
                XMLParameter pa4 = new XMLParameter("image");
                XMLParameter pa5 = new XMLParameter("image");
                XMLParameter pt6 = new XMLParameter("presentationstate");
                XMLParameterCollection pa6 = new XMLParameterCollection();

                try
                {

                    for (int i = 0; i < ids.InputParameters.Count; i++)
                    {
                        switch (ids.InputParameters.GetParameter(i).Step)
                        {
                            case "createPatient":
                                pa1.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value);
                                break;
                            case "acquire":
                                pa2.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value);
                                break;
                            case "setImageInfo":
                                pa4.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value);
                                break;
                            default:
                                Console.WriteLine("There is no valid selection when parse input parameters.");
                                break;
                        }
                    }

                    //If we need change parameter by specific logic, please put code here

                    //Get service result
                    //Step1 result

                    XMLResult step1_result = pats.createPatient(pa1);

                    //Log step1 service output
                    if (step1_result.IsErrorOccured)
                    {
                        p1.Result = TestResult.Fail;
                        p1.Outputs.AddParameter("createPatient", "Error", step1_result.ResultContent);
                        SaveRound(r);
                        continue;
                    }

                    p1.Result = TestResult.Pass;
                    p1.Outputs.AddParameter("createPatient", "Success", step1_result.ResultContent);

                    //Change input parameter according the output of Step1
                    pa2.AddParameter("patient_internal_id", step1_result.SingleResult);

                    //Step2 result

                    //if acquireType isn't emtpy string, skip step2, here is only RVG acquisition
                    bool acqflag = true;
                    XMLResult step3_result = new XMLResult();
                    if (pa2.GetParameterValueByName("acquireType") == null || pa2.GetParameterValueByName("acquireType") == "")
                    {
                        XMLResult rslAcqRVG = acq.startAcquisition(pa2);
                        System.Threading.Thread.Sleep(3000);
                        if (rslAcqRVG.IsErrorOccured)
                        {
                            System.Diagnostics.Debug.Print("Acquire fail:");
                            p2.Result = TestResult.Fail;
                            p2.Outputs.AddParameter("acquire", "Acquire image error", rslAcqRVG.Message);
//.........这里部分代码省略.........
开发者ID:Manivannan-ezhumalai,项目名称:AutomationTestFramework,代码行数:101,代码来源:PresentationState.cs

示例10: Run

        public override void Run()
        {
            string openObjInfo = string.Empty;
            string psId = string.Empty;
            KDIS7ImageWindow iw = new KDIS7ImageWindow();
            KDIS7ATAssistant ka = new KDIS7ATAssistant();

            ApplicationService appService = new ApplicationService();

            try
            {
                string PatientId = CommonLib.CreatePatient();
                ImportService import = new ImportService();
                XMLResult importResult = import.importObject(PatientId, string.Empty, @"c:\PASPerformance\001.png",null, true, string.Empty);
                psId = importResult.MultiResults[1].GetParameterValueByIndex(0);

                XMLParameter pa = new XMLParameter("two_dimension_viewer");
                pa.AddParameter("internal_id", psId);

                openObjInfo = pa.GenerateXML();

                appService.openObjects(pa);
                iw.ItemByID(psId).WaitProperty("ShownOnScreen", true, 60);
            }
            catch (Exception ex)
            {
                LogRecordType lr = new LogRecordType();
                lr.FunctionName = this.mFunctionName;
                lr.Lable = this.mLabel;
                string innerText = ex.InnerException == null ? string.Empty : ex.InnerException.Message;
                lr.Message = ex.Message + innerText == string.Empty ? string.Empty : "(" + innerText + ")";
                lr.Passed = false;

                Log.AddRecord(lr);

                this.RiseSingleCallCompleteEvent(lr.ResponseTime, lr.Passed, true);
                this.RiseTestCaseCompleteEvent();

                this.mExecuted = this.mRepeat;
                this.mFailed = this.mRepeat;

                return;
            }

            for (int i = 1; i <= this.mRepeat; i++)
            {
                LogRecordType lr = new LogRecordType();
                lr.Lable = this.mLabel;
                lr.FunctionName = this.mFunctionName;

                try
                {
                    XMLResult result = new XMLResult(appService.InvokeMethod("openObjects", new object[] { openObjInfo }));

                    lr.ResponseTime = appService.ResponseTime;
                    lr.Passed = !(result.IsErrorOccured);

                    if (!lr.Passed)
                    {
                        lr.Message = result.Message;
                        this.mFailed++;
                    }
                    else
                    {
                        lr.Message = result.SingleResult;
                        this.mExectuedTime += lr.ResponseTime;
                    }
                }
                catch (Exception ex)
                {
                    this.mFailed++;
                    lr.Passed = false;
                    string innerText = ex.InnerException == null ? string.Empty : ex.InnerException.Message;
                    lr.Message = ex.Message + innerText == string.Empty ? string.Empty : "(" + innerText + ")";
                }

                this.mExecuted = i;
                Log.AddRecord(lr);

                this.RiseSingleCallCompleteEvent(lr.ResponseTime, lr.Passed);
            }

            this.RiseTestCaseCompleteEvent();
        }
开发者ID:Erkan-Yilmaz,项目名称:AutomationTestFramework,代码行数:84,代码来源:OpenObjectWithCSIOpened.cs

示例11: Run_3D_CreateVolume_GetVolumeInfo_Customdata_Case1364

        //Case 1364: 1.9.1_WorkFlow_CreateVolume_GetVolumeInfo_customdata
        public void Run_3D_CreateVolume_GetVolumeInfo_Customdata_Case1364()
        {
            int runCount = 0;
            foreach (InputDataSet ids in this.Input.DataSets)
            {
                runCount++;
                Round r = this.NewRound(runCount.ToString(), "WorkFlow CreateVolume_GetVolume_CustomData");

                try
                {
                    VolumeService vs = new VolumeService();
                    string volumeID = null;
                    XMLParameterCollection cInputData = new XMLParameterCollection();
                    XMLParameter cSeriesData = new XMLParameter("series");
                    XMLParameter cVolumeData = new XMLParameter("volume");
                    XMLParameter cSlicePathData = new XMLParameter("slices_path_list");
                    string studyUID = string.Empty;
                    for (int i = 0; i < ids.InputParameters.Count; i++)
                    {
                        switch (ids.InputParameters.GetParameter(i).Step)
                        {
                            case "na":
                                studyUID = ids.InputParameters.GetParameter(i).Value;
                                break;
                            case "series":
                                cSeriesData.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value, false);
                                break;
                            case "volume":
                                cVolumeData.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value, false);
                                break;
                            case "slices_path_list":
                                cSlicePathData.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value, false);
                                break;

                        }
                    }

                    string ep_3dscanmode = null;
                    string ep_3dscanobject = null;
                    string ep_3dfunctionalmode = null;

                    for (int i = 0; i < ids.ExpectedValues.Count; i++)
                    {
                        if (ids.ExpectedValues.GetParameter(i).Step == "get")
                        {
                            switch (ids.ExpectedValues.GetParameter(i).Key)
                            {
                                case "3dscanmode":
                                    ep_3dscanmode = ids.ExpectedValues.GetParameter(i).Value;
                                    break;
                                case "3dscanobject":
                                    ep_3dscanobject = ids.ExpectedValues.GetParameter(i).Value;
                                    break;
                                case "3dfunctionalmode":
                                    ep_3dfunctionalmode = ids.ExpectedValues.GetParameter(i).Value;
                                    break;
                                default:
                                    break;
                            }
                        }
                    }

                    CheckPoint pCreate = new CheckPoint("Create", "WorkFlow CreateVolume_GetVolume_CustomData");
                    r.CheckPoints.Add(pCreate);

                    cInputData.Add(cSeriesData);
                    cInputData.Add(cVolumeData);
                    cInputData.Add(cSlicePathData);
                    XMLResult rslCreate = vs.createVolume(studyUID, cInputData);

                    if (!rslCreate.IsErrorOccured)
                    {
                        pCreate.Result = TestResult.Pass;
                        volumeID = rslCreate.SingleResult;
                        pCreate.Outputs.AddParameter("Create", "CreateVolume_GetVolume_CustomData Success", volumeID);
                    }
                    else
                    {
                        pCreate.Result = TestResult.Fail;
                        pCreate.Outputs.AddParameter("Create", "CreateVolume_GetVolume_CustomData Fail", rslCreate.ResultContent);
                        SaveRound(r);
                        continue;
                    }

                    CheckPoint pGet = new CheckPoint("Get", "WorkFlow CreateVolume_GetVolume_CustomData");
                    r.CheckPoints.Add(pGet);

                    XMLParameter filter = new XMLParameter("volume");
                    filter.AddParameter("internal_id", volumeID);
                    filter.AddParameter("path_type", "all");

                    string str1 = string.Empty;
                    string str2 = string.Empty;
                    string str3 = string.Empty;
                    XMLResult rslget = vs.getVolumeInfo(filter);
                    foreach (XMLParameter p in rslget.MultiResults)
                    {
                        if (p.Name == "volume")
                        {
//.........这里部分代码省略.........
开发者ID:Manivannan-ezhumalai,项目名称:AutomationTestFramework,代码行数:101,代码来源:3D.cs

示例12: Run_3D_SetNameFor3DObjects_Case1627

        //Case 1627: 1.1.12.01_Set Name for 3d objects
        public void Run_3D_SetNameFor3DObjects_Case1627()
        {
            int runCount = 0;
            foreach (InputDataSet ids in this.Input.DataSets)
            {
                runCount++;
                Round r = this.NewRound(runCount.ToString(), "Set 3D Object Name");
                CheckPoint pset = new CheckPoint("Set 3DObject Name", " Check for 3d object set name");
                r.CheckPoints.Add(pset);

                string threedid = ids.InputParameters.GetParameter("threedid" + runCount.ToString()).Value;
                string testname = ids.InputParameters.GetParameter("testname" + runCount.ToString()).Value;

                XMLParameter cInputSet = new XMLParameter("volume");
                cInputSet.AddParameter("name", testname);

                XMLParameter cInputGet = new XMLParameter("volume");
                cInputGet.AddParameter("internal_id", threedid);
                cInputGet.AddParameter("path_type", "all");

                try
                {

                    VolumeService vs = new VolumeService();

                    XMLResult rslset = vs.setVolume(threedid, cInputSet);
                    if (rslset.IsErrorOccured)
                    {
                        pset.Result = TestResult.Fail;
                        pset.Outputs.AddParameter("set volume", "fail", rslset.Message);
                        SaveRound(r);
                        continue;
                    }

                    XMLResult rslget = vs.getVolumeInfo(cInputGet);

                    if (rslget.IsErrorOccured)
                    {

                        pset.Result = TestResult.Fail;
                        pset.Outputs.AddParameter("get volume", "fail", rslget.Message);
                        SaveRound(r);
                        continue;
                    }

                    string getname = string.Empty;
                    foreach (XMLParameterNode x in rslget.MultiResults[2].Parameters)
                    {
                        if (x.ParameterName == "name")
                        {
                            getname = x.ParameterValue;
                        }
                    }

                    if (getname != testname)
                    {
                        pset.Result = TestResult.Fail;
                        pset.Outputs.AddParameter("set volume", "fail", "Get Value is not equal to set Value");

                        SaveRound(r);
                        continue;
                    }

                    pset.Result = TestResult.Pass;
                    pset.Outputs.AddParameter("set volume", "Success", "OK");
                    SaveRound(r);
                }
                catch (Exception e)
                {
                    pset.Result = TestResult.Fail;
                    pset.Outputs.AddParameter("set volume", "Exception caught", e.Message);

                    SaveRound(r);
                    continue;
                }

            }
            Output();
        }
开发者ID:Manivannan-ezhumalai,项目名称:AutomationTestFramework,代码行数:80,代码来源:3D.cs

示例13: Run_3D_createCrossSection_localizeruid_exist_Case1503

        //Case 1503: 1.9.3.1_createCrossSection_localizer_dicom_series_instance_uid_exist
        public void Run_3D_createCrossSection_localizeruid_exist_Case1503()
        {
            int runCount = 0;

            foreach (InputDataSet ids in this.Input.DataSets)
            {
                runCount++;

                Round r = this.NewRound(runCount.ToString(), ids.Description);

                try
                {
                    //Input parameters
                    string crossectionUID_FirstTime = string.Empty;
                    string crossectionUID_SecondTime = string.Empty;

                    string ep_first_localizer_dicom_series_instance_uid = string.Empty;
                    string ep_second_localizer_dicom_series_instance_uid = string.Empty;

                    string p_volumeUID = null;
                    XMLParameterCollection p_createCrossSectionFirstTime = new XMLParameterCollection();
                    XMLParameterCollection p_createCrossSectionSecondTime = new XMLParameterCollection();

                    XMLParameter crosssectionFirstTime = new XMLParameter("crosssection");
                    XMLParameter crosssectionSecondTime = new XMLParameter("crosssection");

                    XMLParameter slicesPathList = new XMLParameter("slices_path_list");
                    XMLParameter slicesPSAnnotationList = new XMLParameter("slices_ps_xml_annotation_list");
                    XMLParameter slicesPSGeneralList = new XMLParameter("slices_ps_xml_general_list");
                    XMLParameter slicesPSProcessingList = new XMLParameter("slices_ps_xml_processing_list");

                    XMLParameter slicesThumbnailList = new XMLParameter("slices_ps_thumbnail_path_list");

                    for (int i = 0; i < ids.InputParameters.Count; i++)
                    {
                        if (ids.InputParameters.GetParameter(i).Step == "create_volumeUID")
                        {
                            p_volumeUID = ids.InputParameters.GetParameter(i).Value;
                        }
                        else if (ids.InputParameters.GetParameter(i).Step == "create_crossSection")
                        {
                            if (ids.InputParameters.GetParameter(i).Key == "slices_dicom_series_instance_uid")
                            {
                                crosssectionFirstTime.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value + "_firsttime", false);
                                crosssectionSecondTime.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value + "_secondtime", false);
                            }
                            else
                            {
                                crosssectionFirstTime.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value, false);
                                crosssectionSecondTime.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value, false);
                                if (ids.InputParameters.GetParameter(i).Key == "first_localizer_dicom_series_instance_uid")
                                {
                                    ep_first_localizer_dicom_series_instance_uid = ids.InputParameters.GetParameter(i).Value; // Record the first_localizer_dicom_series_instance_uid value to check later
                                }
                                else if (ids.InputParameters.GetParameter(i).Key == "second_localizer_dicom_series_instance_uid")
                                {
                                    ep_second_localizer_dicom_series_instance_uid = ids.InputParameters.GetParameter(i).Value; // Record the second_localizer_dicom_series_instance_uid value to check later
                                }
                            }
                        }
                        else if (ids.InputParameters.GetParameter(i).Step == "create_slices_path_list")
                        {
                            slicesPathList.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value, false);
                        }
                        else if (ids.InputParameters.GetParameter(i).Step == "create_slices_ps_xml_annotation_list")
                        {
                            slicesPSAnnotationList.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value, false);
                        }
                        else if (ids.InputParameters.GetParameter(i).Step == "create_slices_ps_xml_general_list")
                        {
                            slicesPSGeneralList.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value, false);
                        }
                        else if (ids.InputParameters.GetParameter(i).Step == "create_slices_ps_xml_processing_list")
                        {
                            slicesPSProcessingList.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value, false);
                        }
                        else if (ids.InputParameters.GetParameter(i).Step == "create_slices_ps_thumbnail_path_list")
                        {
                            slicesThumbnailList.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value, false);
                        }
                    }

                    p_createCrossSectionFirstTime.Add(crosssectionFirstTime);
                    p_createCrossSectionFirstTime.Add(slicesPathList);
                    p_createCrossSectionFirstTime.Add(slicesPSAnnotationList);
                    p_createCrossSectionFirstTime.Add(slicesPSGeneralList);
                    p_createCrossSectionFirstTime.Add(slicesPSProcessingList);
                    p_createCrossSectionFirstTime.Add(slicesThumbnailList);

                    p_createCrossSectionSecondTime.Add(crosssectionSecondTime);
                    p_createCrossSectionSecondTime.Add(slicesPathList);
                    p_createCrossSectionSecondTime.Add(slicesPSAnnotationList);
                    p_createCrossSectionSecondTime.Add(slicesPSGeneralList);
                    p_createCrossSectionSecondTime.Add(slicesPSProcessingList);
                    p_createCrossSectionSecondTime.Add(slicesThumbnailList);

                    //Output parameter

                    CrossSectionService crossSectionSvc = new CrossSectionService();
//.........这里部分代码省略.........
开发者ID:Manivannan-ezhumalai,项目名称:AutomationTestFramework,代码行数:101,代码来源:3D.cs

示例14: Run_3D_ImportCSModel_GetVolumeInfo_Case1220

        //Case 1220: 1.9.1_WorkFlow_N2_Import CS Model_GetVolumeInfo
        public void Run_3D_ImportCSModel_GetVolumeInfo_Case1220()
        {
            int runCount = 0;
            string patientUID = string.Empty;
            bool isCreatePatient = false;
            bool isDeletePatient = true;
            foreach (InputDataSet ids in this.Input.DataSets)
            {
                isCreatePatient = false;
                runCount++;
                Round r = this.NewRound(runCount.ToString(), "Import image");

                ImportService importSvc = new ImportService();
                XMLParameter pCreatePatient = new XMLParameter("patient");
                XMLParameter pImportImage = new XMLParameter("import");
                for (int i = 0; i < ids.InputParameters.Count; i++)
                {
                    if (ids.InputParameters.GetParameter(i).Step == "create")
                    {
                        pCreatePatient.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value);
                        isCreatePatient = true;
                    }
                    if (ids.InputParameters.GetParameter(i).Step == "import")
                    {
                        pImportImage.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value);
                    }
                }

                XMLParameter epGetVolumeInfo = new XMLParameter();

                for (int i = 0; i < ids.ExpectedValues.Count; i++)
                {
                    if (ids.ExpectedValues.GetParameter(i).Step == "getVolumeInfo")
                    {
                        epGetVolumeInfo.AddParameter(ids.ExpectedValues.GetParameter(i).Key, ids.ExpectedValues.GetParameter(i).Value);
                    }
                }

                try
                {
                    PatientService patientSvc = new PatientService();
                    if (isCreatePatient)
                    {
                        CheckPoint pCreate = new CheckPoint("Create Patient", "Test create");
                        r.CheckPoints.Add(pCreate);

                        XMLResult result = patientSvc.createPatient(pCreatePatient);
                        if (!result.IsErrorOccured)
                        {
                            patientUID = result.SingleResult;
                            pCreate.Result = TestResult.Pass;
                            pCreate.Outputs.AddParameter("Create patient UID", "Create Patient", patientUID);
                        }
                        else
                        {
                            pCreate.Result = TestResult.Fail;
                            pCreate.Outputs.AddParameter("Create patient returns error", "Create Patient", result.ResultContent);
                        }
                    }

                    CheckPoint cpImport = new CheckPoint("Import Image", "Test import");
                    r.CheckPoints.Add(cpImport);

                    string filePath = string.Empty;
                    string archivePath = string.Empty;
                    bool overrideExisted = false;
                    for (int c = 0; c < pImportImage.Length; c++)
                    {
                        if (pImportImage.GetParameterName(c) == "path")
                            filePath = pImportImage.GetParameterValue(c);
                        if (pImportImage.GetParameterName(c) == "archivePath")
                            archivePath = pImportImage.GetParameterValue(c);
                        if (pImportImage.GetParameterName(c) == "move")
                        {
                            if (pImportImage.GetParameterValue(c) == "true")
                                overrideExisted = true;
                        }
                    }

                    XMLResult rtlImport = importSvc.importObject(patientUID, "", filePath, archivePath, overrideExisted, "false");

                    /**********************************************
                        import return sample:
                        - <trophy type="result" version="1.0">
                          <status code="0" message="ok" />
                        - <volume>
                          <parameter key="internal_id" value="5412d81a-c096-4b0d-ab93-524266af21b6" />
                          </volume>
                          </trophy>
                     * **********************************************/

                    if (rtlImport.IsErrorOccured)
                    {
                        cpImport.Result = TestResult.Fail;
                        cpImport.Outputs.AddParameter("Import volume fail", "Import", rtlImport.Message);
                        cpImport.Outputs.AddParameter("Import volume returns error code", "Import", rtlImport.Code.ToString());
                    }
                    else
                    {
//.........这里部分代码省略.........
开发者ID:Manivannan-ezhumalai,项目名称:AutomationTestFramework,代码行数:101,代码来源:3D.cs

示例15: Run_3D_GetCrossSectionInfo_Case1477

        //Case 1477: 1.9.3.5_getCrossSectionInfo
        //public void Run_3D_CreateVolume_GetVolumeInfo_DeleteVolume_Case1368() //Case 1368: 1.9.1_Create_Get_Delete_Volume_Normal
        //{
        //    int runCount = 0;
        //    foreach (InputDataSet ids in this.Input.DataSets)
        //    {
        //        runCount++;
        //        Round r = this.NewRound(runCount.ToString(), "3D Unit Create_Get_Delete_Volume");
        //        CheckPoint pCreate = new CheckPoint("3D Unit", "3D Unit Create_Get_Delete_Volume");
        //        r.CheckPoints.Add(pCreate);
        //        VolumeService vs = new VolumeService();
        //        XMLParameterCollection cInputData = new XMLParameterCollection();
        //        XMLParameter cSeriesData = new XMLParameter("series");
        //        XMLParameter cVolumeData = new XMLParameter("volume");
        //        XMLParameter cSlicePathData = new XMLParameter("slices_path_list");
        //        string studyUID = string.Empty;
        //        for (int i = 0; i < ids.InputParameters.Count; i++)
        //        {
        //            switch (ids.InputParameters.GetParameter(i).Step)
        //            {
        //                case "na":
        //                    studyUID = ids.InputParameters.GetParameter(i).Value;
        //                    break;
        //                case "series":
        //                    cSeriesData.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value, false);
        //                    break;
        //                case "volume":
        //                    cVolumeData.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value, false);
        //                    break;
        //                case "slices_path_list":
        //                    cSlicePathData.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value, false);
        //                    break;
        //            }
        //        }
        //        cInputData.Add(cSeriesData);
        //        cInputData.Add(cVolumeData);
        //        cInputData.Add(cSlicePathData);
        //        string test = cInputData.GenerateXML();
        //        XMLResult rslCreate = vs.createVolume(studyUID, cInputData);
        //        string volumeID = rslCreate.SingleResult;
        //        XMLParameter filter = new XMLParameter("volume");
        //        filter.AddParameter("internal_id", volumeID);
        //        filter.AddParameter("path_type", "all");
        //        XMLResult rslget = vs.getVolumeInfo(filter);
        //        XMLResult rsldel = vs.deleteVolume(volumeID);
        //        if (!rslCreate.IsErrorOccured && !rslget.IsErrorOccured && !rsldel.IsErrorOccured)
        //        {
        //            pCreate.Result = TestResult.Pass;
        //            pCreate.Outputs.AddParameter("3D Unit", "CRU Volume Success", volumeID);
        //        }
        //        else
        //        {
        //            pCreate.Result = TestResult.Fail;
        //            pCreate.Outputs.AddParameter("3D Unit", "CreateVolume", "Create:" + rslCreate.Message + " Get:" + rslget.Message + " delete:" + rsldel.Message);
        //        }
        //        SaveRound(r);
        //        Output();
        //    }
        //}
        public void Run_3D_GetCrossSectionInfo_Case1477()
        {
            int runCount = 0;

            foreach (InputDataSet ids in this.Input.DataSets)
            {
                runCount++;

                Round r = this.NewRound(runCount.ToString(), ids.Description);

                try
                {
                    //Input parameters
                    string p_volumeUID = null;
                    XMLParameterCollection p_createCrossSection = new XMLParameterCollection();
                    XMLParameter crosssection = new XMLParameter("crosssection");
                    XMLParameter slicesPathList = new XMLParameter("slices_path_list");
                    XMLParameter slicesPSAnnotationList = new XMLParameter("slices_ps_xml_annotation_list");
                    XMLParameter slicesPSGeneralList = new XMLParameter("slices_ps_xml_general_list");
                    XMLParameter slicesPSProcessingList = new XMLParameter("slices_ps_xml_processing_list");

                    XMLParameter slicesThumbnailList = new XMLParameter("slices_ps_thumbnail_path_list");

                    for (int i = 0; i < ids.InputParameters.Count; i++)
                    {
                        if (ids.InputParameters.GetParameter(i).Step == "create_volumeUID")
                        {
                            p_volumeUID = ids.InputParameters.GetParameter(i).Value;
                        }
                        else if (ids.InputParameters.GetParameter(i).Step == "create_crosssection")
                        {
                            crosssection.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value, false);
                        }
                        else if (ids.InputParameters.GetParameter(i).Step == "create_slices_path_list")
                        {
                            slicesPathList.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value, false);
                        }
                        else if (ids.InputParameters.GetParameter(i).Step == "create_slices_ps_xml_annotation_list")
                        {
                            slicesPSAnnotationList.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value, false);
                        }
//.........这里部分代码省略.........
开发者ID:Manivannan-ezhumalai,项目名称:AutomationTestFramework,代码行数:101,代码来源:3D.cs


注:本文中的PAS.AutoTest.PasATCore.XMLParameter.AddParameter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。