Examples of XFormDialog


Examples of com.eviware.x.form.XFormDialog

    if( actions == null )
      actions = defaultActions;
    else
      actions.addActions( defaultActions );

    XFormDialog dialog = builder.buildDialog( actions, messages.get( formAnnotation.description() ),
        UISupport.createImageIcon( formAnnotation.icon() ) );

    return dialog;
  }
View Full Code Here

Examples of com.eviware.x.form.XFormDialog

    else
    {
      // since there is only one action do it like this
      actions.insertAction( defaultActions.getActionAt( 0 ), 0 );
    }
    XFormDialog dialog = builder.buildDialog( actions, messages.get( formAnnotation.description() ),
        UISupport.createImageIcon( formAnnotation.icon() ) );

    return dialog;
  }
View Full Code Here

Examples of com.eviware.x.form.XFormDialog

    if( actions == null )
      actions = defaultActions;
    else
      actions.addActions( defaultActions );

    XFormDialog dialog = builder.buildDialog( actions, formAnnotation.description(),
        UISupport.createImageIcon( formAnnotation.icon() ) );

    return dialog;
  }
View Full Code Here

Examples of com.eviware.x.form.XFormDialog

    {
      defaultActions.addActions( actions );
      actions = defaultActions;
    }

    XFormDialog dialog = builder.buildDialog( actions, formAnnotation.description(),
        UISupport.createImageIcon( formAnnotation.icon() ) );

    return dialog;
  }
View Full Code Here

Examples of com.eviware.x.form.XFormDialog

      {
        buildForm( builder, pageAnnotation.name(), field.getType(), messages );
      }
    }

    XFormDialog dialog = builder.buildWizard( formAnnotation.description(),
        UISupport.createImageIcon( formAnnotation.icon() ), formAnnotation.helpUrl() );

    return dialog;
  }
View Full Code Here

Examples of com.eviware.x.form.XFormDialog

    closeDialog( modelItem );
  }

  private ArgumentBuilder buildArgs( WsdlInterface modelItem ) throws IOException
  {
    XFormDialog dialog = getDialog();
    if( dialog == null )
    {
      ArgumentBuilder builder = new ArgumentBuilder( new StringToStringMap() );
      builder.startScript( "tcpmon", ".bat", ".sh" );
      return builder;
    }

    StringToStringMap values = dialog.getValues();

    ArgumentBuilder builder = new ArgumentBuilder( values );
    builder.startScript( "tcpmon", ".bat", ".sh" );

    builder.addArgs( values.get( PORT ) );
View Full Code Here

Examples of com.eviware.x.form.XFormDialog

    generateTestSuite( target, false );
  }

  public WsdlTestSuite generateTestSuite( WsdlInterface iface, boolean atCreation )
  {
    XFormDialog dialog = ADialogBuilder.buildDialog( GenerateForm.class );
    dialog.setValue( GenerateForm.STYLE, "One TestCase for each Operation" );
    dialog.setValue( GenerateForm.REQUEST_CONTENT, "Create new empty requests" );
    String[] names = ModelSupport.getNames( iface.getOperationList() );
    dialog.setOptions( GenerateForm.OPERATIONS, names );
    XFormOptionsField operationsFormField = ( XFormOptionsField )dialog.getFormField( GenerateForm.OPERATIONS );
    operationsFormField.setSelectedOptions( names );

    WsdlProject project = iface.getProject();
    String[] testSuites = ModelSupport.getNames( new String[] { "<create>" }, project.getTestSuiteList() );
    dialog.setOptions( GenerateForm.TESTSUITE, testSuites );

    if( dialog.show() )
    {
      List<String> operations = StringUtils.toStringList( operationsFormField.getSelectedOptions() );
      if( operations.size() == 0 )
      {
        UISupport.showErrorMessage( "No Operations selected.." );
        return null;
      }

      String testSuiteName = dialog.getValue( GenerateForm.TESTSUITE );

      if( testSuiteName.equals( "<create>" ) )
        testSuiteName = UISupport.prompt( "Enter name of TestSuite to create", "Generate TestSuite",
            iface.getName() + " TestSuite" );

      if( testSuiteName != null && testSuiteName.trim().length() > 0 )
      {
        WsdlTestSuite testSuite = project.getTestSuiteByName( testSuiteName );

        if( testSuite == null )
        {
          testSuite = project.addNewTestSuite( testSuiteName );
        }

        int style = dialog.getValueIndex( GenerateForm.STYLE );
        boolean useExistingRequests = dialog.getValueIndex( GenerateForm.REQUEST_CONTENT ) == 0;
        boolean generateLoadTest = dialog.getBooleanValue( GenerateForm.GENERATE_LOADTEST );
        if( style == 0 )
        {
          generateMulipleTestCases( testSuite, iface, useExistingRequests, generateLoadTest, operations );
        }
        else if( style == 1 )
View Full Code Here

Examples of com.eviware.x.form.XFormDialog

  }

  public void perform( AbstractInterface<?> iface, Object param )
  {

    XFormDialog dialog = buildDialog( iface );

    initValues( iface );

    if( dialog.show() )
    {
      String session = dialog.getValue( SESSION );
      int i = dialog.getValueIndex( SEND );
      if( i == -1 )
      {
        UISupport.showErrorMessage( "Not supported endpoint" );
        return;
      }
      String send = destinationNameList.get( i ).getDestinationName();
      int j = dialog.getValueIndex( RECEIVE );
      if( j == -1 )
      {
        UISupport.showErrorMessage( "Not supported endpoint" );
        return;
      }
View Full Code Here

Examples of com.eviware.x.form.XFormDialog

    generateMockService( iface, false );
  }

  public WsdlMockService generateMockService( WsdlInterface iface, boolean atCreation )
  {
    XFormDialog dialog = ADialogBuilder.buildDialog( Form.class );
    dialog.setBooleanValue( Form.ADD_ENDPOINT, true );
    String[] names = ModelSupport.getNames( iface.getOperationList() );
    dialog.setOptions( Form.OPERATIONS, names );
    XFormOptionsField operationsFormField = ( XFormOptionsField )dialog.getFormField( Form.OPERATIONS );
    operationsFormField.setSelectedOptions( names );

    dialog.getFormField( Form.START_MOCKSERVICE ).setEnabled( !atCreation );

    WsdlProject project = ( WsdlProject )iface.getProject();
    String[] mockServices = ModelSupport.getNames( new String[] { CREATE_MOCKSUITE_OPTION },
        project.getMockServiceList() );
    dialog.setOptions( Form.MOCKSERVICE, mockServices );

    dialog.setValue( Form.PATH, "/mock" + iface.getName() );
    dialog.setValue( Form.PORT, "8088" );

    if( dialog.show() )
    {
      List<String> operations = StringUtils.toStringList( operationsFormField.getSelectedOptions() );
      if( operations.size() == 0 )
      {
        UISupport.showErrorMessage( "No Operations selected.." );
        return null;
      }

      String mockServiceName = dialog.getValue( Form.MOCKSERVICE );
      WsdlMockService mockService = ( WsdlMockService )project.getMockServiceByName( mockServiceName );

      if( mockService == null || mockServiceName.equals( CREATE_MOCKSUITE_OPTION ) )
      {
        mockServiceName = UISupport.prompt( "Specify name of MockService to create", getName(), iface.getName()
            + " MockService" );
        if( mockServiceName == null )
          return null;

        mockService = ( WsdlMockService )project.addNewMockService( mockServiceName );
      }

      mockService.setPath( dialog.getValue( Form.PATH ) );
      try
      {
        mockService.setPort( Integer.parseInt( dialog.getValue( Form.PORT ) ) );
      }
      catch( NumberFormatException e1 )
      {
      }

      for( int i = 0; i < iface.getOperationCount(); i++ )
      {
        WsdlOperation operation = ( WsdlOperation )iface.getOperationAt( i );
        if( !operations.contains( operation.getName() ) )
          continue;

        WsdlMockOperation mockOperation = ( WsdlMockOperation )mockService.addNewMockOperation( operation );
        if( mockOperation != null )
          mockOperation.addNewMockResponse( "Response 1", true );
      }

      if( dialog.getBooleanValue( Form.ADD_ENDPOINT ) )
      {
        iface.addEndpoint( mockService.getLocalEndpoint() );
      }

      if( !atCreation )
      {
        WsdlMockServiceDesktopPanel desktopPanel = ( WsdlMockServiceDesktopPanel )UISupport
            .showDesktopPanel( mockService );

        if( dialog.getBooleanValue( Form.START_MOCKSERVICE ) )
        {
          desktopPanel.startMockService();
          SoapUI.getDesktop().minimize( desktopPanel );
        }
      }
View Full Code Here

Examples of com.eviware.x.form.XFormDialog

    toolHost.run( new ProcessToolRunner( builder, "soapUI Security TestRunner", modelItem, args ) );
  }

  private ArgumentBuilder buildArgs( WsdlProject modelItem ) throws IOException
  {
    XFormDialog dialog = getDialog();
    if( dialog == null )
    {
      ArgumentBuilder builder = new ArgumentBuilder( new StringToStringMap() );
      builder.startScript( SECURITYTESTRUNNER, BAT, SH );
      return builder;
    }

    StringToStringMap values = dialog.getValues();

    ArgumentBuilder builder = new ArgumentBuilder( values );

    builder.startScript( SECURITYTESTRUNNER, BAT, SH );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.