Exemplo n.º 1
0
        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());
        }
Exemplo n.º 2
0
        public void Bind()
        {
            XMLFilePathTextBox.Init(Context.GetAsContext(mAct.Context), mAct.GetOrCreateInputParam(ActSoapUI.Fields.XMLFile), true, true, UCValueExpression.eBrowserType.File, "xml", new RoutedEventHandler(BrowseButtonXML_Click));

            GingerCore.GeneralLib.BindingHandler.ActInputValueBinding(DoNotImportFile, CheckBox.IsCheckedProperty, mAct.GetOrCreateInputParam(ActSoapUI.Fields.ImportFile));

            GingerCore.GeneralLib.BindingHandler.ActInputValueBinding(IgnoreReportXMLValidation, CheckBox.IsCheckedProperty, mAct.GetOrCreateInputParam(ActSoapUI.Fields.IgnoreValidation));

            GingerCore.GeneralLib.BindingHandler.ActInputValueBinding(TestSuiteComboBox, ComboBox.TextProperty, mAct.GetOrCreateInputParam(ActSoapUI.Fields.TestSuite));
            GingerCore.GeneralLib.BindingHandler.ActInputValueBinding(TestCaseComboBox, ComboBox.TextProperty, mAct.GetOrCreateInputParam(ActSoapUI.Fields.TestCase));
            GingerCore.GeneralLib.BindingHandler.ActInputValueBinding(UIrelatedCheckBox, CheckBox.IsCheckedProperty, mAct.GetOrCreateInputParam(ActSoapUI.Fields.UIrelated));
            GingerCore.GeneralLib.BindingHandler.ActInputValueBinding(TestCasePropertiesRequieredCheckBox, CheckBox.IsCheckedProperty, mAct.GetOrCreateInputParam(ActSoapUI.Fields.TestCasePropertiesRequiered));

            PropertiesOrPlaceHoldersInit();
            MergeAndClearList();
            InitPropertiesGrid(mAct.AllProperties, "Properties", "Property Type", "Property Name", "Property Value", "Property Calculated Value");

            //place holder property list
            TestSuitePlaceHolderGrid.Init(Context.GetAsContext(mAct.Context), mAct.TestSuitePlaceHolder, "PlaceHolder Properties", "PlaceHolder Name", "PlaceHolder Value", "PlaceHolder Calculated Value");

            EndPointTextBox.Init(Context.GetAsContext(mAct.Context), mAct.GetOrCreateInputParam(ActSoapUI.Fields.EndPoint));
            HostPortTextBox.Init(Context.GetAsContext(mAct.Context), mAct.GetOrCreateInputParam(ActSoapUI.Fields.HostPort));
            UsernameTextBox.Init(Context.GetAsContext(mAct.Context), mAct.GetOrCreateInputParam(ActSoapUI.Fields.Username));
            PasswordTextBox.Init(Context.GetAsContext(mAct.Context), mAct.GetOrCreateInputParam(ActSoapUI.Fields.Password));
            DomainTextBox.Init(Context.GetAsContext(mAct.Context), mAct.GetOrCreateInputParam(ActSoapUI.Fields.Domain));



            PasswordWSSUCComboBox.Init(mAct.GetOrCreateInputParam(ActSoapUI.Fields.PasswordWSSType), typeof(ActSoapUI.ePasswordWSSType), false, new SelectionChangedEventHandler(PasswordWSSComboBox_SelectionChanged));
            PasswordWSSUCComboBox.ComboBox.IsEditable = true;

            if (!string.IsNullOrEmpty(XMLFilePathTextBox.ValueTextBox.Text))
            {
                TestSuiteComboBox.SelectedValue = mAct.GetInputParamCalculatedValue(ActSoapUI.Fields.TestSuite);
                TestCaseComboBox.SelectedValue  = mAct.GetInputParamCalculatedValue(ActSoapUI.Fields.TestCase);
            }

            SystemPropertiesVEGrid.Init(Context.GetAsContext(mAct.Context), mAct.SystemProperties, "System Properties", "Property Name", "Property Value", "Property Calculated Value");
            GlobalPropertiesVEGrid.Init(Context.GetAsContext(mAct.Context), mAct.GlobalProperties, "Global Properties", "Property Name", "Property Value", "Property Calculated Value");
            ExpendPopulatedExpenders();

            GingerCore.GeneralLib.BindingHandler.ActInputValueBinding(AddXMLTagsToOutput, CheckBox.IsCheckedProperty, mAct.GetOrCreateInputParam(ActSoapUI.Fields.AddXMLResponse));
            GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(OpenExecutionDirectoryButton, Button.IsEnabledProperty, mAct, ActSoapUI.Fields.isActionExecuted, BindingMode.OneWay);
            ProjectPropertiesGrid.VEGrid.AddToolbarTool("@Reset_16x16.png", "Reset Properties to default", new RoutedEventHandler(ResetProjectButton_Click));
        }