Package com.eviware.soapui.model.mock

Examples of com.eviware.soapui.model.mock.MockResponse


  private final static class ResponseListCellRenderer extends JLabel implements ListCellRenderer
  {
    public Component getListCellRendererComponent( JList list, Object value, int index, boolean isSelected,
        boolean cellHasFocus )
    {
      MockResponse testStep = ( MockResponse )value;
      setText( testStep.getName() );
      setIcon( testStep.getIcon() );

      if( isSelected )
      {
        setBackground( list.getSelectionBackground() );
        setForeground( list.getSelectionForeground() );
View Full Code Here


  {
    super( mockOperation, mockOperation.getMockService(), treeModel );

    for( int c = 0; c < mockOperation.getMockResponseCount(); c++ )
    {
      MockResponse mockResponse = mockOperation.getMockResponseAt( c );
      mockResponseNodes.add( new MockResponseTreeNode( mockResponse, getTreeModel() ) );
    }

    treeModel.mapModelItems( mockResponseNodes );
  }
View Full Code Here

          || ( propertyModelItem instanceof MockService && ( ( MockOperation )contextModelItem ).getMockService() == propertyModelItem );
    }

    if( contextModelItem instanceof MockResponse )
    {
      MockResponse testStep = ( ( MockResponse )contextModelItem );

      return propertyModelItem == contextModelItem
          || ( propertyModelItem instanceof MockService && testStep.getMockOperation().getMockService() == propertyModelItem )
          || ( propertyModelItem instanceof MockOperation && testStep.getMockOperation() == propertyModelItem )
          || ( propertyModelItem instanceof MockResponse && testStep.getMockOperation() == ( ( MockResponse )propertyModelItem )
              .getMockOperation() );
    }

    if( contextModelItem instanceof SecurityTest )
    {
View Full Code Here

  }

  public String toString()
  {
    StringBuilder msg = new StringBuilder( dateFormat.format( new Date( getTimestamp() ) ) );
    MockResponse mockResponse = getMockResponse();

    if( mockResponse == null )
    {
      msg.append( ": [dispatch error; missing response]" );
    }
    else
    {
      try
      {
        msg.append( ": [" + mockResponse.getMockOperation().getName() );
      }
      catch( Throwable e )
      {
        msg.append( ": [removed operation?]" );
      }
View Full Code Here

    public MockOperationTreeNode(MockOperation mockOperation, SoapUITreeModel treeModel) {
        super(mockOperation, mockOperation.getMockService(), treeModel);

        for (int c = 0; c < mockOperation.getMockResponseCount(); c++) {
            MockResponse mockResponse = mockOperation.getMockResponseAt(c);
            mockResponseNodes.add(new MockResponseTreeNode(mockResponse, getTreeModel()));
        }

        treeModel.mapModelItems(mockResponseNodes);
    }
View Full Code Here

    public void verifyBackwardCompatibilityForBasic462ProjectWithMockService() throws XmlException, IOException, SoapUIException, URISyntaxException {

        assertThat(project.getMockServiceCount(), is(2));
        MockService mockService = project.getMockServiceByName("MockService 1");
        MockOperation mockOperation = mockService.getMockOperationByName("ConversionRate");
        MockResponse mockResponse = mockOperation.getMockResponseByName("Response 1");
        assertTrue(mockResponse.getResponseContent().contains("10"));
    }
View Full Code Here

    }

    public String toString() {
        StringBuilder msg = new StringBuilder(DateUtil.formatExtraFull(new Date(getTimestamp())));

        MockResponse mockResponse = getMockResponse();

        if (mockResponse == null) {
            msg.append(": [dispatch error; missing response]");
        } else {
            try {
                msg.append(": [" + mockResponse.getMockOperation().getName());
            } catch (Throwable e) {
                msg.append(": [removed operation?]");
            }

            msg.append("] " + getTimeTaken() + "ms");
View Full Code Here

            PropertyChangeListener {
        private java.util.List<MockResponse> responses = new ArrayList<MockResponse>();

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

                responses.add(mockResponse);
            }

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

    }

    private final static class ResponseListCellRenderer extends JLabel implements ListCellRenderer {
        public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
                                                      boolean cellHasFocus) {
            MockResponse testStep = (MockResponse) value;
            setText(testStep.getName());
            setIcon(testStep.getIcon());

            if (isSelected) {
                setBackground(list.getSelectionBackground());
                setForeground(list.getSelectionForeground());
            } else {
View Full Code Here

            return propertyModelItem == contextModelItem
                    || (propertyModelItem instanceof MockService && ((MockOperation) contextModelItem).getMockService() == propertyModelItem);
        }

        if (contextModelItem instanceof MockResponse) {
            MockResponse testStep = ((MockResponse) contextModelItem);

            return propertyModelItem == contextModelItem
                    || (propertyModelItem instanceof MockService && testStep.getMockOperation().getMockService() == propertyModelItem)
                    || (propertyModelItem instanceof MockOperation && testStep.getMockOperation() == propertyModelItem)
                    || (propertyModelItem instanceof MockResponse && testStep.getMockOperation() == ((MockResponse) propertyModelItem)
                    .getMockOperation());
        }

        if (contextModelItem instanceof SecurityTest) {
            SecurityTest securityTest = ((SecurityTest) contextModelItem);
View Full Code Here

TOP

Related Classes of com.eviware.soapui.model.mock.MockResponse

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.