Package com.eviware.soapui.impl.wsdl.teststeps

Examples of com.eviware.soapui.impl.wsdl.teststeps.PropertyTransfer$InternalTestSuiteListener


      putValue( Action.SHORT_DESCRIPTION, "Renames the selected Property Transfer" );
    }

    public void actionPerformed( ActionEvent e )
    {
      PropertyTransfer transfer = getCurrentTransfer();

      String newName = UISupport.prompt( "Specify new name for transfer", "Rename Transfer", transfer.getName() );

      if( newName != null && !transfer.getName().equals( newName ) )
      {
        listModel.setElementAt( newName, transferList.getSelectedIndex() );
        transfer.setName( newName );
      }
    }
View Full Code Here


      putValue( Action.SHORT_DESCRIPTION, "Disables the selected Property Transfer" );
    }

    public void actionPerformed( ActionEvent e )
    {
      PropertyTransfer transfer = getCurrentTransfer();
      transfer.setDisabled( disableButton.isSelected() );

      String name = transfer.getName();
      if( transfer.isDisabled() )
        name += " (disabled)";

      listModel.setElementAt( name, transferList.getSelectedIndex() );
    }
View Full Code Here

      MockTestRunner mockRunner = new MockTestRunner( transferStep.getTestCase() );
      MockTestRunContext context = new MockTestRunContext( mockRunner, transferStep );

      for( int c = 0; c < transferStep.getTransferCount(); c++ )
      {
        PropertyTransfer transfer = transferStep.getTransferAt( c );
        PropertyTransfersTestStep.PropertyTransferResult result = ( PropertyTransfersTestStep.PropertyTransferResult )transferStep
            .run( mockRunner, context, transfer );
        transferLogTableModel.addResult( result );
      }
    }
View Full Code Here

    failTransferCheckBox.addChangeListener( new ChangeListener()
    {

      public void stateChanged( ChangeEvent e )
      {
        PropertyTransfer currentTransfer = getCurrentTransfer();
        if( currentTransfer != null )
        {
          currentTransfer.setFailOnError( failTransferCheckBox.isSelected() );
        }
      }
    } );

    setNullCheckBox = new JCheckBox( "Set null on missing source", false );
    setNullCheckBox.setToolTipText( "Will set target to null if source is missing or null" );
    setNullCheckBox.addChangeListener( new ChangeListener()
    {

      public void stateChanged( ChangeEvent e )
      {
        PropertyTransfer currentTransfer = getCurrentTransfer();
        if( currentTransfer != null )
        {
          currentTransfer.setSetNullOnMissingSource( setNullCheckBox.isSelected() );
        }
      }
    } );

    transferTextContentCheckBox = new JCheckBox( "Transfer text content", false );
    transferTextContentCheckBox.setToolTipText( "Will only transfer text content of source/target elements" );
    transferTextContentCheckBox.addChangeListener( new ChangeListener()
    {

      public void stateChanged( ChangeEvent e )
      {
        PropertyTransfer currentTransfer = getCurrentTransfer();
        if( currentTransfer != null )
        {
          currentTransfer.setTransferTextContent( transferTextContentCheckBox.isSelected() );
        }
      }
    } );

    ignoreEmptyCheckBox = new JCheckBox( "Ignore empty/missing values", false );
    ignoreEmptyCheckBox.setToolTipText( "Will not transfer empty or missing values" );
    ignoreEmptyCheckBox.addChangeListener( new ChangeListener()
    {

      public void stateChanged( ChangeEvent e )
      {
        PropertyTransfer currentTransfer = getCurrentTransfer();
        if( currentTransfer != null )
        {
          currentTransfer.setIgnoreEmpty( ignoreEmptyCheckBox.isSelected() );
        }
      }
    } );

    transferAllCheckBox = new JCheckBox( "Transfer to all", false );
    transferAllCheckBox.setToolTipText( "Will transfer to all matching target selections" );
    transferAllCheckBox.addChangeListener( new ChangeListener()
    {

      public void stateChanged( ChangeEvent e )
      {
        PropertyTransfer currentTransfer = getCurrentTransfer();
        if( currentTransfer != null )
        {
          currentTransfer.setTransferToAll( transferAllCheckBox.isSelected() );
        }
      }
    } );

    useXQueryCheckBox = new JCheckBox( "Use XQuery", false );
    useXQueryCheckBox.setToolTipText( "Interprets the source xpath as an XQuery expression" );
    useXQueryCheckBox.addChangeListener( new ChangeListener()
    {

      public void stateChanged( ChangeEvent e )
      {
        PropertyTransfer currentTransfer = getCurrentTransfer();
        if( currentTransfer != null )
        {
          currentTransfer.setUseXQuery( useXQueryCheckBox.isSelected() );
        }
      }
    } );

    entitizeCheckBox = new JCheckBox( "Entitize transferred value(s)", false );
    entitizeCheckBox.setToolTipText( "Entitize transferred values when possible" );
    entitizeCheckBox.addChangeListener( new ChangeListener()
    {

      public void stateChanged( ChangeEvent e )
      {
        PropertyTransfer currentTransfer = getCurrentTransfer();
        if( currentTransfer != null )
        {
          currentTransfer.setEntitize( entitizeCheckBox.isSelected() );
        }
      }
    } );

    transferChildNodesCheckBox = new JCheckBox( "Transfer Child Nodes", false );
    transferChildNodesCheckBox
        .setToolTipText( "Transfers child nodes of specified source node to children of specified target" );
    transferChildNodesCheckBox.addChangeListener( new ChangeListener()
    {

      public void stateChanged( ChangeEvent e )
      {
        PropertyTransfer currentTransfer = getCurrentTransfer();
        if( currentTransfer != null )
        {
          currentTransfer.setTransferChildNodes( transferChildNodesCheckBox.isSelected() );
        }
      }
    } );

    panel.add( failTransferCheckBox );
View Full Code Here

      public void itemStateChanged( ItemEvent e )
      {
        if( e.getStateChange() == ItemEvent.SELECTED && !selecting )
        {
          TestPropertyHolder targetStep = ( TestPropertyHolder )targetStepCombo.getSelectedItem();
          PropertyTransfer valueTransfer = getCurrentTransfer();

          if( valueTransfer != null )
          {
            String name = "";

            if( targetStep == PropertyExpansionUtils.getGlobalProperties() )
              name = PropertyExpansion.GLOBAL_REFERENCE;
            else if( targetStep == transferStep.getTestCase().getTestSuite().getProject() )
              name = PropertyExpansion.PROJECT_REFERENCE;
            else if( targetStep == transferStep.getTestCase().getTestSuite() )
              name = PropertyExpansion.TESTSUITE_REFERENCE;
            else if( targetStep == transferStep.getTestCase() )
              name = PropertyExpansion.TESTCASE_REFERENCE;
            else
              name = targetStep.getModelItem().getName();

            valueTransfer.setTargetStepName( name );
          }
        }
      }
    } );

    toolbar.add( UISupport.setFixedSize( targetStepCombo, 180, 21 ) );
    toolbar.addUnrelatedGap();

    toolbar.addFixed( new JLabel( " Property: " ) );
    toolbar.addRelatedGap();

    targetPropertyCombo.setToolTipText( "The property the value will be transferred to" );
    targetPropertyCombo.setEnabled( false );
    targetPropertyCombo.addItemListener( new ItemListener()
    {

      public void itemStateChanged( ItemEvent e )
      {
        if( e.getStateChange() == ItemEvent.SELECTED && !selecting )
        {
          TestProperty targetProperty = ( TestProperty )targetPropertyCombo.getSelectedItem();
          PropertyTransfer valueTransfer = getCurrentTransfer();

          if( valueTransfer != null )
          {
            valueTransfer.setTargetPropertyName( targetProperty.getName() );
          }
        }
      }
    } );
View Full Code Here

      public void itemStateChanged( ItemEvent e )
      {
        if( e.getStateChange() == ItemEvent.SELECTED && !selecting )
        {
          TestPropertyHolder sourceStep = ( TestPropertyHolder )sourceStepCombo.getSelectedItem();
          PropertyTransfer valueTransfer = getCurrentTransfer();

          if( valueTransfer != null )
          {
            String name = "";

            if( sourceStep == PropertyExpansionUtils.getGlobalProperties() )
              name = PropertyExpansion.GLOBAL_REFERENCE;
            else if( sourceStep == transferStep.getTestCase().getTestSuite().getProject() )
              name = PropertyExpansion.PROJECT_REFERENCE;
            else if( sourceStep == transferStep.getTestCase().getTestSuite() )
              name = PropertyExpansion.TESTSUITE_REFERENCE;
            else if( sourceStep == transferStep.getTestCase() )
              name = PropertyExpansion.TESTCASE_REFERENCE;
            else
              name = sourceStep.getModelItem().getName();

            valueTransfer.setSourceStepName( name );
          }
        }
      }
    } );

    toolbar.add( UISupport.setFixedSize( sourceStepCombo, 180, 21 ) );
    toolbar.addUnrelatedGap();

    toolbar.addFixed( new JLabel( " Property: " ) );
    toolbar.addRelatedGap();

    sourcePropertyCombo.setToolTipText( "The property the value will be transferred from" );
    sourcePropertyCombo.setEnabled( false );
    sourcePropertyCombo.addItemListener( new ItemListener()
    {

      public void itemStateChanged( ItemEvent e )
      {
        if( e.getStateChange() == ItemEvent.SELECTED && !selecting )
        {
          TestProperty sourceProperty = ( TestProperty )sourcePropertyCombo.getSelectedItem();
          PropertyTransfer valueTransfer = getCurrentTransfer();

          if( valueTransfer != null )
          {
            valueTransfer.setSourcePropertyName( sourceProperty.getName() );
          }
        }
      }
    } );
View Full Code Here

  public boolean onClose( boolean canCancel )
  {
    transferStep.getTestCase().getTestSuite().removeTestSuiteListener( testSuiteListener );
    transferStep.getTestCase().removeTestRunListener( testRunListener );

    PropertyTransfer transfer = getCurrentTransfer();

    if( transfer != null )
    {
      transfer.removePropertyChangeListener( transferPropertyChangeListener );
    }

    TestPropertyHolder item = ( TestPropertyHolder )sourceStepCombo.getSelectedItem();
    if( item != null )
    {
View Full Code Here

    }

    public void actionPerformed( ActionEvent e )
    {
      int ix = transferList.getSelectedIndex();
      PropertyTransfer config = transferStep.getTransferAt( ix );

      String name = UISupport.prompt( "Specify name for value transfer", "Copy Transfer", config.getName() );
      if( name == null || name.trim().length() == 0 )
        return;

      PropertyTransfer transfer = transferStep.addTransfer( name );
      transfer.setSourceStepName( config.getSourceStepName() );
      transfer.setSourcePropertyName( config.getSourcePropertyName() );
      transfer.setSourcePath( config.getSourcePath() );
      transfer.setTargetStepName( config.getTargetStepName() );
      transfer.setTargetPropertyName( config.getTargetPropertyName() );
      transfer.setTargetPath( config.getTargetPath() );
      transfer.setDisabled( config.isDisabled() );
      transfer.setEntitize( config.getEntitize() );
      transfer.setFailOnError( config.getFailOnError() );
      transfer.setIgnoreEmpty( config.getIgnoreEmpty() );
      transfer.setSetNullOnMissingSource( config.getSetNullOnMissingSource() );
      transfer.setTransferChildNodes( config.getTransferChildNodes() );
      transfer.setTransferTextContent( config.getTransferTextContent() );
      transfer.setTransferToAll( config.getTransferToAll() );
      transfer.setUseXQuery( config.getUseXQuery() );

      listModel.addElement( name );
      transferList.setSelectedIndex( listModel.getSize() - 1 );
    }
View Full Code Here

        failTransferCheckBox = new JCheckBox("Fail transfer on error", false);
        failTransferCheckBox.setToolTipText("Fails the Property Transfer Step if an error occurs");
        failTransferCheckBox.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                PropertyTransfer currentTransfer = getCurrentTransfer();
                if (currentTransfer != null) {
                    currentTransfer.setFailOnError(failTransferCheckBox.isSelected());
                }
            }
        });

        setNullCheckBox = new JCheckBox("Set null on missing source", false);
        setNullCheckBox.setToolTipText("Will set target to null if source is missing or null");
        setNullCheckBox.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                PropertyTransfer currentTransfer = getCurrentTransfer();
                if (currentTransfer != null) {
                    currentTransfer.setSetNullOnMissingSource(setNullCheckBox.isSelected());
                }
            }
        });

        transferTextContentCheckBox = new JCheckBox("Transfer text content", false);
        transferTextContentCheckBox.setToolTipText("Will only transfer text content of source/target elements");
        transferTextContentCheckBox.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                PropertyTransfer currentTransfer = getCurrentTransfer();
                if (currentTransfer != null) {
                    currentTransfer.setTransferTextContent(transferTextContentCheckBox.isSelected());
                }
            }
        });

        ignoreEmptyCheckBox = new JCheckBox("Ignore empty/missing values", false);
        ignoreEmptyCheckBox.setToolTipText("Will not transfer empty or missing values");
        ignoreEmptyCheckBox.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                PropertyTransfer currentTransfer = getCurrentTransfer();
                if (currentTransfer != null) {
                    currentTransfer.setIgnoreEmpty(ignoreEmptyCheckBox.isSelected());
                }
            }
        });

        transferAllCheckBox = new JCheckBox("Transfer to all", false);
        transferAllCheckBox.setToolTipText("Will transfer to all matching target selections");
        transferAllCheckBox.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                PropertyTransfer currentTransfer = getCurrentTransfer();
                if (currentTransfer != null) {
                    currentTransfer.setTransferToAll(transferAllCheckBox.isSelected());
                }
            }
        });

        entitizeCheckBox = new JCheckBox("Entitize transferred value(s)", false);
        entitizeCheckBox.setToolTipText("Entitize transferred values when possible");
        entitizeCheckBox.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                PropertyTransfer currentTransfer = getCurrentTransfer();
                if (currentTransfer != null) {
                    currentTransfer.setEntitize(entitizeCheckBox.isSelected());
                }
            }
        });

        transferChildNodesCheckBox = new JCheckBox("Transfer Child Nodes", false);
        transferChildNodesCheckBox
                .setToolTipText("Transfers child nodes of specified source node to children of specified target");
        transferChildNodesCheckBox.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                PropertyTransfer currentTransfer = getCurrentTransfer();
                if (currentTransfer != null) {
                    currentTransfer.setTransferChildNodes(transferChildNodesCheckBox.isSelected());
                }
            }
        });

        panel.add(failTransferCheckBox);
View Full Code Here

        targetStepCombo.addItemListener(new ItemListener() {

            public void itemStateChanged(ItemEvent e) {
                if (e.getStateChange() == ItemEvent.SELECTED && !selecting) {
                    TestPropertyHolder targetStep = (TestPropertyHolder) targetStepCombo.getSelectedItem();
                    PropertyTransfer valueTransfer = getCurrentTransfer();

                    if (valueTransfer != null) {
                        String name;
                        if (targetStep == PropertyExpansionUtils.getGlobalProperties()) {
                            name = PropertyExpansion.GLOBAL_REFERENCE;
                        } else if (targetStep == transferStep.getTestCase().getTestSuite().getProject()) {
                            name = PropertyExpansion.PROJECT_REFERENCE;
                        } else if (targetStep == transferStep.getTestCase().getTestSuite()) {
                            name = PropertyExpansion.TESTSUITE_REFERENCE;
                        } else if (targetStep == transferStep.getTestCase()) {
                            name = PropertyExpansion.TESTCASE_REFERENCE;
                        } else {
                            name = targetStep.getModelItem().getName();
                        }

                        valueTransfer.setTargetStepName(name);
                    }
                }
            }
        });

        toolbar.add(UISupport.setFixedSize(targetStepCombo, 180, 21));
        toolbar.addUnrelatedGap();

        toolbar.addFixed(new JLabel(" Property: "));
        toolbar.addRelatedGap();

        targetPropertyCombo.setToolTipText("The property the value will be transferred to");
        targetPropertyCombo.setEnabled(false);
        targetPropertyCombo.addItemListener(new ItemListener() {

            public void itemStateChanged(ItemEvent e) {
                if (e.getStateChange() == ItemEvent.SELECTED && !selecting) {
                    TestProperty targetProperty = (TestProperty) targetPropertyCombo.getSelectedItem();
                    PropertyTransfer valueTransfer = getCurrentTransfer();

                    if (valueTransfer != null) {
                        valueTransfer.setTargetPropertyName(targetProperty.getName());
                    }
                }
            }
        });
        String context = "Target";
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.wsdl.teststeps.PropertyTransfer$InternalTestSuiteListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.