Package com.eviware.soapui.impl.rest

Examples of com.eviware.soapui.impl.rest.RestResource.addNewMethod()


        RestService restService1 = (RestService) project
                .addNewInterface(INTERFACE_NAME, RestServiceFactory.REST_TYPE);
        RestService restService2 = (RestService) project
                .addNewInterface(INTERFACE_NAME, RestServiceFactory.REST_TYPE);
        RestResource restResource = restService2.addNewResource(RESOURCE_NAME, PATH);
        restResource.addNewMethod(METHOD_NAME);
        Mockito.when(testCase.getParent()).thenReturn(project);

        TestStepConfig config = TestStepConfig.Factory.newInstance();
        RestRequestStepConfig configConfig = (RestRequestStepConfig) config.addNewConfig().changeType(RestRequestStepConfig.type);
        configConfig.setService(INTERFACE_NAME);
View Full Code Here


    public void canRenameRestParameterInAncestorResource() throws Exception {
        RestResource parentResource = makeRestResource();
        String oldName = "the_original_name";
        parentResource.addProperty(oldName);
        RestResource childResource = parentResource.addNewChildResource("child", "child");
        RestMethod method = childResource.addNewMethod("Get Method");
        restRequest = new RestRequest(method, RestRequestConfig.Factory.newInstance(), false);

        parametersHolder = (RestRequestParamsPropertyHolder) restRequest.getParams();
        String newParameterName = "the_new_name";
        parametersHolder.renameProperty(oldName, newParameterName);
View Full Code Here

    private RestResource createRestRequestModel(StatefulModelItemFactory modelItemFactory) throws SoapUIException {
        restRequest = modelItemFactory.makeRestRequest();
        restRequest.setMethod(RestRequestInterface.HttpMethod.GET);
        RestResource restResource = restRequest.getResource();
        restResource.getParams().addProperty(PARAMETER_NAME);
        restResource.addNewMethod(restRequest.getRestMethod().getName());
        RestMethodConfig restMethodConfig = restResource.getRestMethodList().get(0).getConfig();
        restMethodConfig.setMethod("GET");

        restService().addEndpoint(ENDPOINT);
        RestParamProperty restParamProperty = restRequest.getParams().getProperty(PARAMETER_NAME);
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.