当前位置: 首页>>代码示例>>Java>>正文


Java RequestSpecification.queryParam方法代码示例

本文整理汇总了Java中com.jayway.restassured.specification.RequestSpecification.queryParam方法的典型用法代码示例。如果您正苦于以下问题:Java RequestSpecification.queryParam方法的具体用法?Java RequestSpecification.queryParam怎么用?Java RequestSpecification.queryParam使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.jayway.restassured.specification.RequestSpecification的用法示例。


在下文中一共展示了RequestSpecification.queryParam方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: searchRequest

import com.jayway.restassured.specification.RequestSpecification; //导入方法依赖的package包/类
public RequestSpecification searchRequest(String nodes, String nest, boolean getItems, String query, String filter,
	String order)
{
	RequestSpecification request = successfulRequest();
	request.queryParam("nodes", nodes);
	request.queryParam("getitems", getItems);

	if( nest != null )
	{
		request.queryParam("nest", nest);
	}
	if( query != null )
	{
		request.param("q", query);
	}
	if( filter != null )
	{
		request = request.queryParam("filter", filter);
	}
	if( order != null )
	{
		request = request.queryParam("order", order);
	}
	return request;
}
 
开发者ID:equella,项目名称:Equella,代码行数:26,代码来源:FacetRequests.java

示例2: searchRequest

import com.jayway.restassured.specification.RequestSpecification; //导入方法依赖的package包/类
public RequestSpecification searchRequest(String query, String filter, String order, String length)
{
	RequestSpecification request = successfulRequest().param("q", query);
	if( filter != null )
	{
		request = request.queryParam("filter", filter);
	}
	if( order != null )
	{
		request = request.queryParam("order", order);
	}
	if( length != null )
	{
		request = request.queryParam("length", length);
	}
	return request;
}
 
开发者ID:equella,项目名称:Equella,代码行数:18,代码来源:TaskRequests.java

示例3: getDetails

import com.jayway.restassured.specification.RequestSpecification; //导入方法依赖的package包/类
/**
 * Return the details of a preparation at a given (optional) step.
 *
 * @param preparationId the wanted preparation id.
 * @param wantedStepId the optional wanted step id.
 * @return the details of a preparation at a given (optional) step.
 */
public PreparationMessage getDetails(String preparationId, String wantedStepId) {
    final RequestSpecification specs = given();

    if (StringUtils.isNotBlank(wantedStepId)) {
        specs.queryParam("stepId", wantedStepId);
    }
    final Response response = specs.when().get("/preparations/{id}/details", preparationId);

    if (response.getStatusCode() != 200) {
        throw new MockTDPException(response);
    }

    try {
        return mapper.readerFor(PreparationMessage.class).readValue(response.asString());
    } catch (IOException e) {
        throw new TDPException(UNABLE_TO_READ_CONTENT);
    }

}
 
开发者ID:Talend,项目名称:data-prep,代码行数:27,代码来源:PreparationClientTest.java

示例4: createPreparationFromDataset

import com.jayway.restassured.specification.RequestSpecification; //导入方法依赖的package包/类
/**
 * Create an empty preparation from a dataset.
 *
 * @param dataSetId the dataset id to create the preparation from.
 * @param name the preparation name.
 * @param folderId where to create the preparation.
 * @return the preparation id.
 * @throws IOException sh*t happens.
 */
public String createPreparationFromDataset(final String dataSetId, final String name, final String folderId)
        throws IOException {

    RequestSpecification request = given() //
            .contentType(JSON) //
            .body("{ \"name\": \"" + name + "\", \"dataSetId\": \"" + dataSetId + "\"}");

    if (folderId != null) {
        request = request.queryParam("folder", folderId);
    }

    final Response response = request //
            .when() //
            .expect().statusCode(200).log().ifError() //
            .post("/api/preparations");

    assertThat(response.getStatusCode(), is(200));

    final String preparationId = response.asString();
    assertThat(preparationId, notNullValue());
    assertThat(preparationId, not(""));

    return preparationId;
}
 
开发者ID:Talend,项目名称:data-prep,代码行数:34,代码来源:APIClientTest.java

示例5: searchRequest

import com.jayway.restassured.specification.RequestSpecification; //导入方法依赖的package包/类
public RequestSpecification searchRequest(String query, String type)
{
	RequestSpecification request = successfulRequest().param("q", query);
	if( type != null )
	{
		request = request.queryParam("type", type);
	}
	return request;
}
 
开发者ID:equella,项目名称:Equella,代码行数:10,代码来源:NotificationRequests.java

示例6: createRequest

import com.jayway.restassured.specification.RequestSpecification; //导入方法依赖的package包/类
public RequestSpecification createRequest(ObjectNode object, Object waitForIndex)
{
	RequestSpecification request = createRequest(object);
	if( waitForIndex != null )
	{
		request.queryParam("waitforindex", waitForIndex);
	}
	return request;
}
 
开发者ID:equella,项目名称:Equella,代码行数:10,代码来源:ItemRequests.java

示例7: submit

import com.jayway.restassured.specification.RequestSpecification; //导入方法依赖的package包/类
public ObjectNode submit(ItemId itemId, String message)
{
	RequestSpecification request = actionSuccess();
	if( message != null )
	{
		request = request.queryParam("message", message);
	}
	return action(request, itemId, "submit");
}
 
开发者ID:equella,项目名称:Equella,代码行数:10,代码来源:ItemRequests.java

示例8: importer

import com.jayway.restassured.specification.RequestSpecification; //导入方法依赖的package包/类
public Response importer(ObjectNode object, String stagingId)
{
	RequestSpecification req = importRequest(object);
	if( stagingId != null )
	{
		req = req.queryParam("file", stagingId);
	}
	return importer(req);
}
 
开发者ID:equella,项目名称:Equella,代码行数:10,代码来源:ItemRequests.java

示例9: search

import com.jayway.restassured.specification.RequestSpecification; //导入方法依赖的package包/类
public ObjectNode search(String query)
{
	RequestSpecification request = auth().expect().statusCode(501).with();
	request.queryParam("q", query);
	if( isEquella() )
	{
		return object(request.get(getResolvedPath()));
	}
	// else
	return object(request.get(getResolvedPath() + "/search"));
}
 
开发者ID:equella,项目名称:Equella,代码行数:12,代码来源:UserRequests.java

示例10: rejectRequest

import com.jayway.restassured.specification.RequestSpecification; //导入方法依赖的package包/类
public RequestSpecification rejectRequest(RequestSpecification request, String toTask)
{
	if( toTask != null )
	{
		request = request.queryParam("to", toTask);
	}
	return request;
}
 
开发者ID:equella,项目名称:Equella,代码行数:9,代码来源:TaskRequests.java

示例11: actionRequest

import com.jayway.restassured.specification.RequestSpecification; //导入方法依赖的package包/类
private RequestSpecification actionRequest(RequestSpecification request, String message)
{
	if( message != null )
	{
		request = request.queryParam("message", message);
	}
	return request;
}
 
开发者ID:equella,项目名称:Equella,代码行数:9,代码来源:TaskRequests.java

示例12: searchRequest

import com.jayway.restassured.specification.RequestSpecification; //导入方法依赖的package包/类
public RequestSpecification searchRequest(String query, String order)
{
	RequestSpecification request = successfulRequest().param("q", query);
	if( order != null )
	{
		request = request.queryParam("order", order);
	}
	return request;
}
 
开发者ID:equella,项目名称:Equella,代码行数:10,代码来源:SearchRequests.java

示例13: export

import com.jayway.restassured.specification.RequestSpecification; //导入方法依赖的package包/类
public ObjectNode export()
{
	RequestSpecification request = successfulRequest();
	request.queryParam("export", true);
	if( isEquella() )
	{
		return object(request.get(getResolvedPath()));
	}
	// else
	return object(request.get(getResolvedPath() + "/search"));
}
 
开发者ID:equella,项目名称:Equella,代码行数:12,代码来源:RoleRequests.java

示例14: search

import com.jayway.restassured.specification.RequestSpecification; //导入方法依赖的package包/类
public ObjectNode search(String query)
{
	RequestSpecification request = auth().expect().statusCode(200).with();
	request.queryParam("q", query);
	return object(request.get(getResolvedPath() + "/search"));
}
 
开发者ID:equella,项目名称:Equella,代码行数:7,代码来源:GroupRequests.java

示例15: export

import com.jayway.restassured.specification.RequestSpecification; //导入方法依赖的package包/类
public ObjectNode export()
{
	RequestSpecification request = successfulRequest();
	request.queryParam("export", true);
	return object(request.get(getResolvedPath() + "/"));
}
 
开发者ID:equella,项目名称:Equella,代码行数:7,代码来源:GroupRequests.java


注:本文中的com.jayway.restassured.specification.RequestSpecification.queryParam方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。