Package com.eviware.soapui.impl.rest.support

Examples of com.eviware.soapui.impl.rest.support.RestParamProperty


    private class RestParamPropertyChangeListener implements PropertyChangeListener {
        public void propertyChange(PropertyChangeEvent evt) {
            try {
                if (evt.getPropertyName().equals(XmlBeansRestParamsTestPropertyHolder.PROPERTY_STYLE)) {
                    RestParamProperty source = (RestParamProperty) evt.getSource();
                    ((AbstractModelItem) source.getModelItem()).notifyPropertyChanged(evt.getPropertyName(),
                            evt.getOldValue(), evt.getNewValue());
                }
            } catch (XmlValueDisconnectedException exception) {
                //Do nothing, it must have been removed by another request editor instance under the same resource/method
            }
View Full Code Here


                return 4;
            }

            @Override
            public void setValueAt(Object value, int rowIndex, int columnIndex) {
                RestParamProperty prop = params.getProperty((String) getValueAt(rowIndex, 0));
                if (columnIndex == 1) {
                    prop.setValue(value.toString());
                }
            }

            @Override
            public String getColumnName(int columnIndex) {
View Full Code Here

        restRequest.setMethod(RestRequestInterface.HttpMethod.GET);
        restRequest.getResource().getParams().addProperty(PARAMETER_NAME);
        restRequest.getResource().setPath(RESOURCE_PATH);
        restService().addEndpoint(ENDPOINT);
        restRequest.setEndpoint(ENDPOINT);
        RestParamProperty restParamProperty = restRequest.getParams().getProperty(PARAMETER_NAME);
        restParamProperty.setValue(PARAMETER_VALUE);
        requestDesktopPanel = new RestRequestDesktopPanel(restRequest);
        originalDialogs = UISupport.getDialogs();
        dialogs = new StubbedDialogs();
        UISupport.setDialogs(dialogs);
        endpointsCombo = findEndpointsComboBox();
View Full Code Here

    public void retainsParameterValueWhenChangingItsLevel() throws Exception {
        JTable paramsTable = getRestParameterTable();
        paramsTable.setValueAt(NewRestResourceActionBase.ParamLocation.METHOD, 0, 3);
        paramsTable.setValueAt(NewRestResourceActionBase.ParamLocation.RESOURCE, 0, 3);

        RestParamProperty returnedParameter = restRequest.getParams().getProperty(PARAMETER_NAME);
        assertThat(returnedParameter.getValue(), is(PARAMETER_VALUE));
    }
View Full Code Here

    @Ignore("Fails intermittently, but works in GUI")
    @Test
    public void parameterAdditionUpdatesParametersField() throws InterruptedException, InvocationTargetException {
        final String parameterName = "the_new_param";
        RestParamProperty newParameter = restRequest.getParams().addProperty(parameterName);
        newParameter.setStyle(RestParamsPropertyHolder.ParameterStyle.QUERY);
        final String value = "the_new_value";
        newParameter.setValue(value);

        assertThat(requestDesktopPanel.queryPanel.getText(), containsString(parameterName + "=" + value));
    }
View Full Code Here

            defaultParams.put(defaultParam.getName(), defaultParam);
        }

        RestParamsPropertyHolder params = restMethod.getParams();
        for (int c = 0; c < params.size(); c++) {
            RestParamProperty param = params.getPropertyAt(c);
            if (!defaultParams.containsKey(param.getName()) || !param.equals(defaultParams.get(param.getName()))) {
                generateParam(requestConfig.addNewParam(), param);
            }
        }

        if (restMethod.hasRequestBody()) {
View Full Code Here

                setPath(getPath().replaceAll("\\{" + name + "\\}", ""));
            }
        }

        private boolean doesParameterExist(String name) {
            RestParamProperty property = params.getProperty(name);
            return property != null;
        }
View Full Code Here

            RestParamProperty property = params.getProperty(name);
            return property != null;
        }

        private boolean isTemplateProperty(String name) {
            RestParamProperty property = params.getProperty(name);
            return property != null && property.getStyle() == RestParamsPropertyHolder.ParameterStyle.TEMPLATE;
        }
View Full Code Here

        paramTable = new RestParamsTable(params, false, new RestParamsTableModel(params, RestParamsTableModel.Mode.FULL), NewRestResourceActionBase.ParamLocation.RESOURCE, false, false).paramsTable;
    }

    @Test
    public void disallowsTemplateParameterForMethodLevel() throws Exception {
        RestParamProperty prop = params.addProperty("prop");
        prop.setParamLocation(NewRestResourceActionBase.ParamLocation.METHOD);
        List<RestParamsPropertyHolder.ParameterStyle> availableStyles = getParameterStyles();
        assertThat(availableStyles, not(hasItem(RestParamsPropertyHolder.ParameterStyle.TEMPLATE)));
    }
View Full Code Here

        assertThat(availableStyles, not(hasItem(RestParamsPropertyHolder.ParameterStyle.TEMPLATE)));
    }

    @Test
    public void allowsTemplateParameterForResourceLevel() throws Exception {
        RestParamProperty prop = params.addProperty("prop");
        prop.setParamLocation(NewRestResourceActionBase.ParamLocation.RESOURCE);
        List<RestParamsPropertyHolder.ParameterStyle> availableStyles = getParameterStyles();
        assertThat(availableStyles, hasItem(RestParamsPropertyHolder.ParameterStyle.TEMPLATE));
    }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.rest.support.RestParamProperty

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.