• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ResponseSpecBuilder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.jayway.restassured.builder.ResponseSpecBuilder的典型用法代码示例。如果您正苦于以下问题:Java ResponseSpecBuilder类的具体用法?Java ResponseSpecBuilder怎么用?Java ResponseSpecBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ResponseSpecBuilder类属于com.jayway.restassured.builder包,在下文中一共展示了ResponseSpecBuilder类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: shouldNotChangeAnythingAfterCancel

import com.jayway.restassured.builder.ResponseSpecBuilder; //导入依赖的package包/类
@Test
public void shouldNotChangeAnythingAfterCancel() throws Exception {
    page.endpoint(NEW_ENDPOINT)
        .apiType(NEW_API_TYPE)
        .cancel();

    page.endpoint()
        .shouldHave(value(apiVersion.getEndpoint()));
    page.apiType()
        .shouldHave(text(apiVersion.getEndpointType().toString()));

    assertApiVersion(apiVersion, new ResponseSpecBuilder()
        .expectBody("endpoint", equalTo(apiVersion.getEndpoint()))
        .expectBody("endpointType", equalTo(apiVersion.getEndpointType().toString()))
        .build());
}
 
开发者ID:apiman,项目名称:apiman-test,代码行数:17,代码来源:ApiImplDetailIT.java


示例2: configureContainers

import com.jayway.restassured.builder.ResponseSpecBuilder; //导入依赖的package包/类
@Override
protected void configureContainers() {
  ResponseSpecBuilder specBuilder = new ResponseSpecBuilder();
  specBuilder.expectStatusCode(200);

  Deployable springBoot =
      MavenDeployables.downloadLatest(
          "org.springframework.boot", "spring-boot-deployment-test-tomcat", DeployableType.WAR);
  JettyContainer container1 =
      JettyContainerBuilder.forDeployable(springBoot).build();
  JettyContainer container2 =
      JettyContainerBuilder.forDeployable(springBoot).build();

  config(Config.defaultConnection());
  bindContainer("spring1", container1);
  bindContainer("spring2", container2);
}
 
开发者ID:Qorr,项目名称:Hvalspik,代码行数:18,代码来源:JettyDoubleContainerBuilderTest.java


示例3: shouldReturnOkOnGetJobsUsingOnlyCount

import com.jayway.restassured.builder.ResponseSpecBuilder; //导入依赖的package包/类
@Test
public void shouldReturnOkOnGetJobsUsingOnlyCount() throws Exception {

    String jobResource = getJobResourcePath(baseURL);

    for (int i = 0; i < 30; i++) {
        post(jobResource, getCreateJobJsonRequired(variantId, repositoryId), "editor", "password", Optional.of("v1"), Optional.empty());
    }

    ResponseSpecBuilder responseSpecBuilder = new ResponseSpecBuilder();
    responseSpecBuilder.expectStatusCode(200);
    responseSpecBuilder.expectBody("page", nullValue());
    responseSpecBuilder.expectBody("per_page", nullValue());
    responseSpecBuilder.expectBody("total_pages", nullValue());
    responseSpecBuilder.expectBody("total_count", equalTo(30));
    responseSpecBuilder.expectBody("data", hasSize(0));
    responseSpecBuilder.expectBody("links", nullValue());
    com.jayway.restassured.response.Response response = get(getJobResourcePath(baseURL) + "?only_count=true", "reader", "password", Optional.of("v1"), Optional.of(responseSpecBuilder.build()));
    // Validate Link Headers
    assertThat(response.header("Link")).isNull();
}
 
开发者ID:projectomakase,项目名称:omakase,代码行数:22,代码来源:JobV1RestIT.java


示例4: shouldReturnOkOnGetJobsDefaultSort

import com.jayway.restassured.builder.ResponseSpecBuilder; //导入依赖的package包/类
@Test
public void shouldReturnOkOnGetJobsDefaultSort() throws Exception {

    String jobResource = getJobResourcePath(baseURL);

    for (int i = 0; i < 5; i++) {
        String json = "{ \"name\" : \"test" + i + "\", \"external_ids\" : [\"id\"], \"status\" : \"UNSUBMITTED\", \"type\" : \"INGEST\", \"priority\": 4,  \"configuration\" : " +
                getJobConfigurationJson(variantId, repositoryId) + "}";
        post(jobResource, json, "editor", "password", Optional.of("v1"), Optional.empty());
    }

    ResponseSpecBuilder responseSpecBuilder = new ResponseSpecBuilder();
    responseSpecBuilder.expectStatusCode(200);
    responseSpecBuilder.expectBody("data.name", contains("test4", "test3", "test2", "test1", "test0"));
    get(getJobResourcePath(baseURL), "reader", "password", Optional.of("v1"), Optional.of(responseSpecBuilder.build()));
}
 
开发者ID:projectomakase,项目名称:omakase,代码行数:17,代码来源:JobV1RestIT.java


示例5: shouldReturnOkOnGetJobsSortNameAsc

import com.jayway.restassured.builder.ResponseSpecBuilder; //导入依赖的package包/类
@Test
public void shouldReturnOkOnGetJobsSortNameAsc() throws Exception {

    String jobResource = getJobResourcePath(baseURL);

    for (int i = 0; i < 5; i++) {
        String json = "{ \"name\" : \"test" + i + "\", \"external_ids\" : [\"id\"], \"status\" : \"UNSUBMITTED\", \"type\" : \"INGEST\", \"priority\": 4,  \"configuration\" : " +
                getJobConfigurationJson(variantId, repositoryId) + "}";
        post(jobResource, json, "editor", "password", Optional.of("v1"), Optional.empty());
    }

    ResponseSpecBuilder responseSpecBuilder = new ResponseSpecBuilder();
    responseSpecBuilder.expectStatusCode(200);
    responseSpecBuilder.expectBody("data.name", contains("test0", "test1", "test2", "test3", "test4"));
    get(getJobResourcePath(baseURL) + "?sort=name&order=ASC", "reader", "password", Optional.of("v1"), Optional.of(responseSpecBuilder.build()));
}
 
开发者ID:projectomakase,项目名称:omakase,代码行数:17,代码来源:JobV1RestIT.java


示例6: shouldReturnOkOnGetJobsFilteredByNameEqual

import com.jayway.restassured.builder.ResponseSpecBuilder; //导入依赖的package包/类
@Test
public void shouldReturnOkOnGetJobsFilteredByNameEqual() throws Exception {

    String jobResource = getJobResourcePath(baseURL);

    for (int i = 0; i < 5; i++) {
        String json = "{ \"name\" : \"test" + i + "\", \"external_ids\" : [\"id\"], \"status\" : \"UNSUBMITTED\", \"type\" : \"INGEST\", \"priority\": 4,  \"configuration\" : " +
                getJobConfigurationJson(variantId, repositoryId) + "}";
        post(jobResource, json, "editor", "password", Optional.of("v1"), Optional.empty());
    }

    ResponseSpecBuilder responseSpecBuilder = new ResponseSpecBuilder();
    responseSpecBuilder.expectStatusCode(200);
    responseSpecBuilder.expectBody("data.name", contains("test0"));
    get(getJobResourcePath(baseURL) + "?name[eq]=test0", "reader", "password", Optional.of("v1"), Optional.of(responseSpecBuilder.build()));
}
 
开发者ID:projectomakase,项目名称:omakase,代码行数:17,代码来源:JobV1RestIT.java


示例7: shouldReturnOkOnGetJobsFilteredByNameWithSpaces

import com.jayway.restassured.builder.ResponseSpecBuilder; //导入依赖的package包/类
@Test
public void shouldReturnOkOnGetJobsFilteredByNameWithSpaces() throws Exception {

    String jobResource = getJobResourcePath(baseURL);

    for (int i = 0; i < 5; i++) {
        String json = "{ \"name\" : \"test " + i + "\", \"external_ids\" : [\"id\"], \"status\" : \"UNSUBMITTED\", \"type\" : \"INGEST\", \"priority\": 4,  \"configuration\" : " +
                getJobConfigurationJson(variantId, repositoryId) + "}";
        post(jobResource, json, "editor", "password", Optional.of("v1"), Optional.empty());
    }

    ResponseSpecBuilder responseSpecBuilder = new ResponseSpecBuilder();
    responseSpecBuilder.expectStatusCode(200);
    responseSpecBuilder.expectBody("data.name", contains("test 0"));
    // the RestAssured framework auto escapes the space to %20
    get(getJobResourcePath(baseURL) + "?name[eq]=test 0", "reader", "password", Optional.of("v1"), Optional.of(responseSpecBuilder.build()));
}
 
开发者ID:projectomakase,项目名称:omakase,代码行数:18,代码来源:JobV1RestIT.java


示例8: shouldReturnOkOnGetJobsFilteredByNameLike

import com.jayway.restassured.builder.ResponseSpecBuilder; //导入依赖的package包/类
@Test
public void shouldReturnOkOnGetJobsFilteredByNameLike() throws Exception {

    String jobResource = getJobResourcePath(baseURL);

    for (int i = 0; i < 5; i++) {
        String json = "{ \"name\" : \"test" + i + "\", \"external_ids\" : [\"id\"], \"status\" : \"UNSUBMITTED\", \"type\" : \"INGEST\", \"priority\": 4,  \"configuration\" : " +
                getJobConfigurationJson(variantId, repositoryId) + "}";
        post(jobResource, json, "editor", "password", Optional.of("v1"), Optional.empty());
    }

    ResponseSpecBuilder responseSpecBuilder = new ResponseSpecBuilder();
    responseSpecBuilder.expectStatusCode(200);
    responseSpecBuilder.expectBody("data.name", contains("test3"));
    get(getJobResourcePath(baseURL) + "?name[like]=3", "reader", "password", Optional.of("v1"), Optional.of(responseSpecBuilder.build()));
}
 
开发者ID:projectomakase,项目名称:omakase,代码行数:17,代码来源:JobV1RestIT.java


示例9: getJobOkResponseSpecification

import com.jayway.restassured.builder.ResponseSpecBuilder; //导入依赖的package包/类
private ResponseSpecification getJobOkResponseSpecification(String jobId, String name, String type, String status, int priority, String createdUsername, String modifiedUsername,
                                                            String... externalIds) {
    String jobResource = getJobResourcePath(baseURL);
    ResponseSpecBuilder builder = new ResponseSpecBuilder();
    builder.expectStatusCode(200);
    builder.expectBody("name", equalTo(name));
    builder.expectBody("external_ids", contains(externalIds));
    builder.expectBody("type", equalTo(type));
    builder.expectBody("status.current", equalTo(status));
    builder.expectBody("status.timestamp", notNullValue(String.class));
    builder.expectBody("priority", equalTo(priority));
    builder.expectBody("created", notNullValue(String.class));
    builder.expectBody("created_by", equalTo(createdUsername));
    builder.expectBody("last_modified", notNullValue(String.class));
    builder.expectBody("last_modified_by", equalTo(modifiedUsername));
    builder.expectBody("links.self.href", equalTo(jobResource + "/" + jobId));
    builder.expectBody("links.configuration.href", equalTo(jobResource + "/" + jobId + "/configuration"));
    builder.expectBody("links.status.href", equalTo(jobResource + "/" + jobId + "/status"));
    return builder.build();
}
 
开发者ID:projectomakase,项目名称:omakase,代码行数:21,代码来源:JobV1RestIT.java


示例10: shouldReturnOkOnGetRepositoriesWithResultsUsingOnlyCount

import com.jayway.restassured.builder.ResponseSpecBuilder; //导入依赖的package包/类
@Test
public void shouldReturnOkOnGetRepositoriesWithResultsUsingOnlyCount() throws Exception {
    String resourcePath = getRepositoriesResourcePath();

    for (int i = 0; i < 30; i++) {
        String json = "{ \"name\" : \"test" + i + "\", \"type\" : \"FILE\"}";
        post(resourcePath, json, "editor", "password", Optional.of("v1"), Optional.empty());
    }

    ResponseSpecBuilder responseSpecBuilder = new ResponseSpecBuilder();
    responseSpecBuilder.expectStatusCode(200);
    responseSpecBuilder.expectBody("page", nullValue());
    responseSpecBuilder.expectBody("per_page", nullValue());
    responseSpecBuilder.expectBody("total_pages", nullValue());
    responseSpecBuilder.expectBody("total_count", equalTo(30));
    responseSpecBuilder.expectBody("data", hasSize(0));
    responseSpecBuilder.expectBody("links", nullValue());
    com.jayway.restassured.response.Response response = get(resourcePath + "?only_count=true", "reader", "password", Optional.of("v1"), Optional.of(responseSpecBuilder.build()));
    // Validate Link Headers
    assertThat(response.header("Link")).isNull();
}
 
开发者ID:projectomakase,项目名称:omakase,代码行数:22,代码来源:RepositoryV1RestIT.java


示例11: getRepositoryOkResponseSpecification

import com.jayway.restassured.builder.ResponseSpecBuilder; //导入依赖的package包/类
private ResponseSpecification getRepositoryOkResponseSpecification(String id, String name, String type, String createdUsername, String modifiedUsername) {
    ResponseSpecBuilder builder = new ResponseSpecBuilder();
    builder.expectStatusCode(200);
    builder.expectBody("id", equalTo(id));
    builder.expectBody("name", equalTo(name));
    builder.expectBody("description", nullValue());
    builder.expectBody("type", equalTo(type));
    builder.expectBody("created", notNullValue(String.class));
    builder.expectBody("created_by", equalTo(createdUsername));
    builder.expectBody("last_modified", notNullValue(String.class));
    builder.expectBody("last_modified_by", equalTo(modifiedUsername));
    builder.expectBody("links.self.href", equalTo(getRepositoriesResourcePath() + "/" + id));
    builder.expectBody("links.configuration.href", equalTo(getRepositoriesResourcePath() + "/" + id + "/configuration"));
    builder.expectBody("links.template.href", equalTo(getRepositoriesResourcePath() + "/templates/" + type));
    return builder.build();
}
 
开发者ID:projectomakase,项目名称:omakase,代码行数:17,代码来源:RepositoryV1RestIT.java


示例12: shouldReturnOkOnGetAssetsWithResultsUsingOnlyCount

import com.jayway.restassured.builder.ResponseSpecBuilder; //导入依赖的package包/类
@Test
public void shouldReturnOkOnGetAssetsWithResultsUsingOnlyCount() throws Exception {
    String assetResourcePath = RestIntegrationTests.getAssetsResourcePath(baseURL);

    for (int i = 0; i < 30; i++) {
        String json = "{ \"name\" : \"test1\", \"external_ids\" : [\"id1\", \"id2\"]}";
        RestIntegrationTests.post(assetResourcePath, json, "editor", "password", Optional.of("v1"), Optional.empty());
    }

    ResponseSpecBuilder responseSpecBuilder = new ResponseSpecBuilder();
    responseSpecBuilder.expectStatusCode(200);
    responseSpecBuilder.expectBody("page", nullValue());
    responseSpecBuilder.expectBody("per_page", nullValue());
    responseSpecBuilder.expectBody("total_pages", nullValue());
    responseSpecBuilder.expectBody("total_count", equalTo(30));
    responseSpecBuilder.expectBody("data", hasSize(0));
    responseSpecBuilder.expectBody("links", nullValue());
    com.jayway.restassured.response.Response response = RestIntegrationTests.get(assetResourcePath + "?only_count=true", "reader", "password", Optional.of("v1"), Optional.of(responseSpecBuilder.build()));
    // Validate Link Headers
    assertThat(response.header("Link")).isNull();
}
 
开发者ID:projectomakase,项目名称:omakase,代码行数:22,代码来源:AssetV1RestIT.java


示例13: getAssetOkResponseSpecification

import com.jayway.restassured.builder.ResponseSpecBuilder; //导入依赖的package包/类
private ResponseSpecification getAssetOkResponseSpecification(String assetId, String name, String createdUsername, String modifiedUsername, String... externalIds) {
    String assetResourcePath = RestIntegrationTests.getAssetsResourcePath(baseURL);
    ResponseSpecBuilder builder = new ResponseSpecBuilder();
    builder.expectStatusCode(200);
    builder.expectBody("name", equalTo(name));
    builder.expectBody("external_ids", contains(externalIds));
    builder.expectBody("created", notNullValue(String.class));
    builder.expectBody("created_by", equalTo(createdUsername));
    builder.expectBody("last_modified", notNullValue(String.class));
    builder.expectBody("last_modified_by", equalTo(modifiedUsername));
    builder.expectBody("links.self.href", equalTo(assetResourcePath + "/" + assetId));
    builder.expectBody("links.related.href", equalTo(assetResourcePath + "/" + assetId + "/related"));
    builder.expectBody("links.parent.href", equalTo(assetResourcePath + "/" + assetId + "/parent"));
    builder.expectBody("links.children.href", equalTo(assetResourcePath + "/" + assetId + "/children"));
    builder.expectBody("links.variants.href", equalTo(assetResourcePath + "/" + assetId + "/variants"));
    builder.expectBody("links.metadata.href", equalTo(assetResourcePath + "/" + assetId + "/metadata"));
    return builder.build();
}
 
开发者ID:projectomakase,项目名称:omakase,代码行数:19,代码来源:AssetV1RestIT.java


示例14: shouldReturnOkOnGetVariantsWithResultsUsingOnlyCount

import com.jayway.restassured.builder.ResponseSpecBuilder; //导入依赖的package包/类
@Test
public void shouldReturnOkOnGetVariantsWithResultsUsingOnlyCount() throws Exception {
    for (int i = 0; i < 30; i++) {
        String json = "{ \"name\" : \"test1\", \"external_ids\" : [\"id1\", \"id2\"]}";
        post(getVariantsResourcePath(baseURL, assetId), json, "editor", "password", Optional.of("v1"), Optional.empty());
    }

    ResponseSpecBuilder responseSpecBuilder = new ResponseSpecBuilder();
    responseSpecBuilder.expectStatusCode(200);
    responseSpecBuilder.expectBody("page", nullValue());
    responseSpecBuilder.expectBody("per_page", nullValue());
    responseSpecBuilder.expectBody("total_pages", nullValue());
    responseSpecBuilder.expectBody("total_count", equalTo(30));
    responseSpecBuilder.expectBody("data", hasSize(0));
    responseSpecBuilder.expectBody("links", nullValue());
    UriBuilder uriBuilder = UriBuilder.fromUri(Throwables.returnableInstance(baseURL::toURI));
    uriBuilder.path("api/assets/{assetId}/variants");
    uriBuilder.queryParam("only_count", true);
    com.jayway.restassured.response.Response response = get(uriBuilder.build(assetId).toString(), "reader", "password", Optional.of("v1"), Optional.of(responseSpecBuilder.build()));
    // Validate Link Headers
    assertThat(response.header("Link")).isNull();
}
 
开发者ID:projectomakase,项目名称:omakase,代码行数:23,代码来源:VariantV1RestIT.java


示例15: shouldReturnOkOnGetWorkersWithResultsUsingOnlyCount

import com.jayway.restassured.builder.ResponseSpecBuilder; //导入依赖的package包/类
@Test
public void shouldReturnOkOnGetWorkersWithResultsUsingOnlyCount() throws Exception {
    String workerResourcePath = getWorkersResourcePath(baseURL);

    for (int i = 0; i < 30; i++) {
        String json = "{ \"name\" : \"test1\", \"external_ids\" : [\"id1\", \"id2\"]}";
        post(workerResourcePath, json, "editor", "password", Optional.of("v1"), Optional.empty());
    }

    ResponseSpecBuilder responseSpecBuilder = new ResponseSpecBuilder();
    responseSpecBuilder.expectStatusCode(200);
    responseSpecBuilder.expectBody("page", nullValue());
    responseSpecBuilder.expectBody("per_page", nullValue());
    responseSpecBuilder.expectBody("total_pages", nullValue());
    responseSpecBuilder.expectBody("total_count", equalTo(30));
    responseSpecBuilder.expectBody("data", hasSize(0));
    responseSpecBuilder.expectBody("links", nullValue());
    com.jayway.restassured.response.Response response = get(workerResourcePath + "?only_count=true", "reader", "password", Optional.of("v1"), Optional.of(responseSpecBuilder.build()));
    // Validate Link Headers
    assertThat(response.header("Link")).isNull();
}
 
开发者ID:projectomakase,项目名称:omakase,代码行数:22,代码来源:WorkerV1RestIT.java


示例16: getWorkerOkResponseSpecification

import com.jayway.restassured.builder.ResponseSpecBuilder; //导入依赖的package包/类
private ResponseSpecification getWorkerOkResponseSpecification(String workerId, String name, String status, String createdUsername, String modifiedUsername, String... externalIds) {
    String workerResourcePath = getWorkersResourcePath(baseURL);
    ResponseSpecBuilder builder = new ResponseSpecBuilder();
    builder.expectStatusCode(200);
    builder.expectBody("name", equalTo(name));
    builder.expectBody("external_ids", contains(externalIds));
    builder.expectBody("status.current", equalTo(status));
    builder.expectBody("status.timestamp", notNullValue(String.class));
    builder.expectBody("created", notNullValue(String.class));
    builder.expectBody("created_by", equalTo(createdUsername));
    builder.expectBody("last_modified", notNullValue(String.class));
    builder.expectBody("last_modified_by", equalTo(modifiedUsername));
    builder.expectBody("links.self.href", equalTo(workerResourcePath + "/" + workerId));
    builder.expectBody("links.messages.href", equalTo(workerResourcePath + "/" + workerId + "/messages"));
    builder.expectBody("links.status.href", equalTo(workerResourcePath + "/" + workerId + "/status"));
    builder.expectBody("links.tasks.href", equalTo(workerResourcePath + "/" + workerId + "/tasks"));
    return builder.build();
}
 
开发者ID:projectomakase,项目名称:omakase,代码行数:19,代码来源:WorkerV1RestIT.java


示例17: shouldReturnOkOnGetLocationsWithResultsUsingOnlyCount

import com.jayway.restassured.builder.ResponseSpecBuilder; //导入依赖的package包/类
@Test
public void shouldReturnOkOnGetLocationsWithResultsUsingOnlyCount() throws Exception {
    String resourcePath = getLocationResourcePath(baseURL);

    for (int i = 0; i < 30; i++) {
        String json = "{ \"name\" : \"test" + i + "\", \"type\" : \"FILE\"}";
        post(resourcePath, json, "editor", "password", Optional.of("v1"), Optional.empty());
    }

    ResponseSpecBuilder responseSpecBuilder = new ResponseSpecBuilder();
    responseSpecBuilder.expectStatusCode(200);
    responseSpecBuilder.expectBody("page", nullValue());
    responseSpecBuilder.expectBody("per_page", nullValue());
    responseSpecBuilder.expectBody("total_pages", nullValue());
    responseSpecBuilder.expectBody("total_count", equalTo(30));
    responseSpecBuilder.expectBody("data", hasSize(0));
    responseSpecBuilder.expectBody("links", nullValue());
    com.jayway.restassured.response.Response response = get(resourcePath + "?only_count=true", "reader", "password", Optional.of("v1"), Optional.of(responseSpecBuilder.build()));
    // Validate Link Headers
    assertThat(response.header("Link")).isNull();
}
 
开发者ID:projectomakase,项目名称:omakase,代码行数:22,代码来源:LocationV1RestIT.java


示例18: getLocationOkResponseSpecification

import com.jayway.restassured.builder.ResponseSpecBuilder; //导入依赖的package包/类
private ResponseSpecification getLocationOkResponseSpecification(String id, String name, String type, String createdUsername, String modifiedUsername) {
    String resourcePath = getLocationResourcePath(baseURL);
    ResponseSpecBuilder builder = new ResponseSpecBuilder();
    builder.expectStatusCode(200);
    builder.expectBody("id", equalTo(id));
    builder.expectBody("name", equalTo(name));
    builder.expectBody("description", nullValue());
    builder.expectBody("type", equalTo(type));
    builder.expectBody("created", notNullValue(String.class));
    builder.expectBody("created_by", equalTo(createdUsername));
    builder.expectBody("last_modified", notNullValue(String.class));
    builder.expectBody("last_modified_by", equalTo(modifiedUsername));
    builder.expectBody("links.self.href", equalTo(resourcePath + "/" + id));
    builder.expectBody("links.configuration.href", equalTo(resourcePath + "/" + id + "/configuration"));
    builder.expectBody("links.template.href", equalTo(resourcePath + "/templates/" + type));
    return builder.build();
}
 
开发者ID:projectomakase,项目名称:omakase,代码行数:18,代码来源:LocationV1RestIT.java


示例19: ServiceTestBase

import com.jayway.restassured.builder.ResponseSpecBuilder; //导入依赖的package包/类
public ServiceTestBase(String propertiesFile) {
    logger = LoggerFactory.getLogger(getClass());
    if (configDir == null) {
        String currentEnvironment = System
                .getProperty(BaseConstant.ENVIRONMENT_PROPERTY);
        if (currentEnvironment == null) {
            currentEnvironment = System
                    .getenv(BaseConstant.ENVIRONMENT_PROPERTY);
            if (currentEnvironment == null) {
                currentEnvironment = BaseConstant.ENVIRONMENT_DEFAULT;
            }
        }
        configDir = "/" + currentEnvironment;
    }
    this.propertiesFile = propertiesFile;
    requestSpecBuilder = new RequestSpecBuilder();
    responseSpecBuilder = new ResponseSpecBuilder();

    if (internalProperties == null) {
        // Only need to read from properties file and set http defaults once for all tests
        readFromPropertiesFile();
        setHttpDefaults();
    }
}
 
开发者ID:eing,项目名称:restassured_cli,代码行数:25,代码来源:ServiceTestBase.java


示例20: setUp

import com.jayway.restassured.builder.ResponseSpecBuilder; //导入依赖的package包/类
@BeforeClass
public static void setUp() {
    apiVersions = new ApiVersions(api);
    expectedPublished = new ResponseSpecBuilder()
        .expectBody("status", equalTo("Published"))
        .expectBody("publishedOn", notNullValue())
        .build();
}
 
开发者ID:apiman,项目名称:apiman-test,代码行数:9,代码来源:PublishApiVersionIT.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Position类代码示例发布时间:2022-05-22
下一篇:
Java AuthenticationStatement类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap