Package com.eviware.soapui.impl.wsdl.mock

Examples of com.eviware.soapui.impl.wsdl.mock.WsdlMockResponse


              WsdlMockOperation mockOperation = mockService.getMockOperation( me.getOperation() );
              if( mockOperation == null )
                mockOperation = mockService.addNewMockOperation( ( WsdlOperation )me.getOperation() );

              WsdlMockResponse mockResponse = mockOperation.addNewMockResponse( "Recorded Test Response "
                  + ( ++cnt ), false );
              mockResponse.setResponseContent( me.getResponseContent() );

              Attachment[] requestAttachments = me.getResponseAttachments();
              if( requestAttachments != null )
              {
                for( Attachment attachment : requestAttachments )
                {
                  mockResponse.addAttachment( attachment );
                }
              }
            }
          }
        }
View Full Code Here


          && testRequest.getOperation().getInterface() == this )
        list.add( testRequest );
    }
    else if( modelItem instanceof WsdlMockResponse )
    {
      WsdlMockResponse mockResponse = ( WsdlMockResponse )modelItem;
      if( mockResponse.getMockOperation() != null && mockResponse.getMockOperation().getOperation() != null
          && mockResponse.getMockOperation().getOperation().getInterface() == this )
        list.add( mockResponse );
    }

    // Traverse the ModelItem hierarchy.
    for( ModelItem child : modelItem.getChildren() )
View Full Code Here

    public ResponseListModel()
    {
      for( int c = 0; c < getModelItem().getMockResponseCount(); c++ )
      {
        WsdlMockResponse mockResponse = ( WsdlMockResponse )getModelItem().getMockResponseAt( c );
        mockResponse.addPropertyChangeListener( this );

        responses.add( mockResponse );
      }

      getModelItem().getMockService().addMockServiceListener( this );
View Full Code Here

    WsdlTestStep testStep = null;
    WsdlTestCase testCase = null;
    WsdlTestSuite testSuite = null;
    WsdlProject project = null;
    WsdlMockService mockService = null;
    WsdlMockResponse mockResponse = null;
    SecurityTest securityTest = null;

    if( modelItem instanceof WsdlTestStep )
    {
      testStep = ( WsdlTestStep )modelItem;
      testCase = testStep.getTestCase();
      testSuite = testCase.getTestSuite();
      project = testSuite.getProject();
    }
    else if( modelItem instanceof WsdlTestCase )
    {
      testCase = ( WsdlTestCase )modelItem;
      testSuite = testCase.getTestSuite();
      project = testSuite.getProject();
    }
    else if( modelItem instanceof WsdlTestSuite )
    {
      testSuite = ( WsdlTestSuite )modelItem;
      project = testSuite.getProject();
    }
    else if( modelItem instanceof WsdlMockService )
    {
      project = ( ( WsdlMockService )modelItem ).getProject();
    }
    else if( modelItem instanceof WsdlMockResponse )
    {
      mockResponse = ( WsdlMockResponse )modelItem;
      mockService = ( mockResponse ).getMockOperation().getMockService();
      project = mockService.getProject();
    }
    else if( modelItem instanceof WsdlProject )
    {
      project = ( WsdlProject )modelItem;
    }
    else if( modelItem instanceof AbstractHttpRequestInterface<?> )
    {
      project = ( ( AbstractHttpRequest<?> )modelItem ).getOperation().getInterface().getProject();
    }
    else if( modelItem instanceof Operation )
    {
      project = ( WsdlProject )( ( Operation )modelItem ).getInterface().getProject();
    }
    else if( modelItem instanceof SecurityTest )
    {
      securityTest = ( SecurityTest )modelItem;
      testCase = securityTest.getTestCase();
      testSuite = testCase.getTestSuite();
      project = testSuite.getProject();
    }

    TestPropertyHolder globalProperties = PropertyExpansionUtils.getGlobalProperties();
    if( globalProperties.getProperties().size() > 0 )
      targetMenu.add( createPropertyMenu( "Global", globalProperties ) );

    if( project != null )
      targetMenu.add( createPropertyMenu( "Project: [" + project.getName() + "]", project ) );

    if( testSuite != null )
      targetMenu.add( createPropertyMenu( "TestSuite: [" + testSuite.getName() + "]", testSuite ) );

    if( mockService != null )
      targetMenu.add( createPropertyMenu( "MockService: [" + mockService.getName() + "]", mockService ) );

    if( mockResponse != null )
      targetMenu.add( createPropertyMenu( "MockResponse: [" + mockResponse.getName() + "]", mockResponse ) );

    if( testCase != null )
    {
      targetMenu.add( createPropertyMenu( "TestCase: [" + testCase.getName() + "]", testCase ) );
View Full Code Here

          WsdlMockOperation mockOperation = mockService.getMockOperation( me.getOperation() );
          if( mockOperation == null )
            mockOperation = mockService.addNewMockOperation( me.getOperation() );

          WsdlMockResponse mockResponse = mockOperation
              .addNewMockResponse( "Monitor Response " + ( ++cnt ), false );
          mockResponse.setResponseContent( me.getResponseContent() );

          Attachment[] requestAttachments = me.getResponseAttachments();
          if( requestAttachments != null )
          {
            for( Attachment attachment : requestAttachments )
            {
              mockResponse.addAttachment( attachment );
            }
          }
        }

        if( cnt == 0 )
View Full Code Here

      super( true, request, WsdlMockResponse.MOCKRESULT_PROPERTY );
    }

    public StringToStringsMap getHeaders()
    {
      WsdlMockResponse request = getModelItem();
      return request.getMockResult() == null ? new StringToStringsMap() : request.getMockResult().getMockRequest()
          .getRequestHeaders();
    }
View Full Code Here

    mockService.setPort( 9081 );
    mockService.setPath( "/testmock" );

    WsdlOperation operation = ( WsdlOperation )iface.getOperationAt( 0 );
    WsdlMockOperation mockOperation = ( WsdlMockOperation )mockService.addNewMockOperation( operation );
    WsdlMockResponse mockResponse = mockOperation.addNewMockResponse( "Test Response", true );
    mockResponse.setResponseContent( "Tjohoo!" );

    mockService.start();

    String endpoint = "http://" + mockService.getHost() + ":" + mockService.getPort() + mockService.getPath();
    iface.addEndpoint( endpoint );
View Full Code Here

    TestStep testStep = null;
    TestCase testCase = null;
    TestSuite testSuite = null;
    Project project = null;
    WsdlMockService mockService = null;
    WsdlMockResponse mockResponse = null;
    SecurityTest securityTest = null;

    if( modelItem instanceof WsdlTestStep )
    {
      testStep = ( WsdlTestStep )modelItem;
      testCase = testStep.getTestCase();
      testSuite = testCase.getTestSuite();
      project = testSuite.getProject();
    }
    else if( modelItem instanceof WsdlTestCase )
    {
      testCase = ( WsdlTestCase )modelItem;
      testSuite = testCase.getTestSuite();
      project = testSuite.getProject();
    }
    else if( modelItem instanceof WsdlLoadTest )
    {
      testCase = ( ( WsdlLoadTest )modelItem ).getTestCase();
      testSuite = testCase.getTestSuite();
      project = testSuite.getProject();
    }
    else if( modelItem instanceof WsdlTestSuite )
    {
      testSuite = ( WsdlTestSuite )modelItem;
      project = testSuite.getProject();
    }
    else if( modelItem instanceof WsdlInterface )
    {
      project = ( ( WsdlInterface )modelItem ).getProject();
    }
    else if( modelItem instanceof WsdlProject )
    {
      project = ( WsdlProject )modelItem;
    }
    else if( modelItem instanceof WsdlMockService )
    {
      mockService = ( WsdlMockService )modelItem;
      project = mockService.getProject();
    }
    else if( modelItem instanceof TestRequest )
    {
      testStep = ( ( TestRequest )modelItem ).getTestStep();
      testCase = testStep.getTestCase();
      testSuite = testCase.getTestSuite();
      project = testSuite.getProject();
    }
    else if( modelItem instanceof AbstractHttpRequestInterface<?> )
    {
      project = ( ( AbstractHttpRequest<?> )modelItem ).getOperation().getInterface().getProject();
    }
    else if( modelItem instanceof WsdlMockOperation )
    {
      mockService = ( ( WsdlMockOperation )modelItem ).getMockService();
      project = mockService.getProject();
    }
    else if( modelItem instanceof WsdlMockResponse )
    {
      mockResponse = ( WsdlMockResponse )modelItem;
      mockService = mockResponse.getMockOperation().getMockService();
      project = mockService.getProject();
    }
    else if( modelItem instanceof SecurityTest )
    {
      securityTest = ( SecurityTest )modelItem;
View Full Code Here

    WsdlTestStep testStep = null;
    WsdlTestCase testCase = null;
    WsdlTestSuite testSuite = null;
    WsdlProject project = null;
    WsdlMockService mockService = null;
    WsdlMockResponse mockResponse = null;
    TestPropertyHolder holder = null;
    SecurityTest securityTest = null;

    if( modelItem instanceof WsdlTestStep )
    {
      testStep = ( WsdlTestStep )modelItem;
      testCase = testStep.getTestCase();
      testSuite = testCase.getTestSuite();
      project = testSuite.getProject();
    }
    else if( modelItem instanceof WsdlTestCase )
    {
      testCase = ( WsdlTestCase )modelItem;
      testSuite = testCase.getTestSuite();
      project = testSuite.getProject();
    }
    else if( modelItem instanceof WsdlTestSuite )
    {
      testSuite = ( WsdlTestSuite )modelItem;
      project = testSuite.getProject();
    }
    else if( modelItem instanceof WsdlInterface )
    {
      project = ( ( WsdlInterface )modelItem ).getProject();
    }
    else if( modelItem instanceof WsdlProject )
    {
      project = ( WsdlProject )modelItem;
    }
    else if( modelItem instanceof WsdlMockService )
    {
      mockService = ( WsdlMockService )modelItem;
      project = mockService.getProject();
    }
    else if( modelItem instanceof AbstractHttpRequestInterface<?> )
    {
      project = ( ( AbstractHttpRequest<?> )modelItem ).getOperation().getInterface().getProject();
    }
    else if( modelItem instanceof WsdlMockOperation )
    {
      mockService = ( ( WsdlMockOperation )modelItem ).getMockService();
      project = mockService.getProject();
    }
    else if( modelItem instanceof WsdlMockResponse )
    {
      mockResponse = ( WsdlMockResponse )modelItem;
      mockService = mockResponse.getMockOperation().getMockService();
      project = mockService.getProject();
    }
    else if( modelItem instanceof SecurityTest )
    {
      securityTest = ( SecurityTest )modelItem;
View Full Code Here

    WsdlMockOperation mockOperation = mockResponse.getMockOperation();
    mockOperation.beforeSave();
    MockResponseConfig config = mockOperation.getConfig().addNewResponse();
    config.set( mockResponse.getConfig().copy() );
    config.setName( name );
    WsdlMockResponse newResponse = mockOperation.addNewMockResponse( config );

    UISupport.selectAndShow( newResponse );
  }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.wsdl.mock.WsdlMockResponse

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.