Search in sources :

Example 6 with ValidatableResponse

use of io.restassured.response.ValidatableResponse in project molgenis by molgenis.

the class RestControllerV1APIIT method testRetrieveEntityAttributePost.

@Test
public void testRetrieveEntityAttributePost() {
    ValidatableResponse response = given().log().all().header(X_MOLGENIS_TOKEN, testUserToken).contentType(APPLICATION_JSON).body(new EntityCollectionRequest()).when().post(API_V1 + "V1_API_TypeTestAPIV1/1/xxref_value?_method=GET").then().log().all();
    validateRetrieveEntityAttribute(response);
}
Also used : ValidatableResponse(io.restassured.response.ValidatableResponse) EntityCollectionRequest(org.molgenis.data.rest.EntityCollectionRequest) Test(org.testng.annotations.Test)

Example 7 with ValidatableResponse

use of io.restassured.response.ValidatableResponse in project molgenis by molgenis.

the class RestControllerV1APIIT method testRetrieveEntityAttributeMetaPost.

@Test
public void testRetrieveEntityAttributeMetaPost() {
    ValidatableResponse response = given().log().all().header(X_MOLGENIS_TOKEN, testUserToken).contentType(APPLICATION_JSON).body(new EntityTypeRequest()).when().post(API_V1 + "V1_API_TypeTestRefAPIV1/meta/value?_method=GET").then().log().all();
    validateRetrieveEntityAttributeMeta(response);
}
Also used : ValidatableResponse(io.restassured.response.ValidatableResponse) EntityTypeRequest(org.molgenis.data.rest.EntityTypeRequest) Test(org.testng.annotations.Test)

Example 8 with ValidatableResponse

use of io.restassured.response.ValidatableResponse in project molgenis by molgenis.

the class RestControllerV1APIIT method testGetEntityTypePost.

@Test
public void testGetEntityTypePost() {
    ValidatableResponse response = given().log().all().header(X_MOLGENIS_TOKEN, testUserToken).contentType(APPLICATION_JSON).body(new EntityTypeRequest()).when().post(API_V1 + "V1_API_TypeTestRefAPIV1/meta?_method=GET").then().log().all();
    validateGetEntityType(response);
}
Also used : ValidatableResponse(io.restassured.response.ValidatableResponse) EntityTypeRequest(org.molgenis.data.rest.EntityTypeRequest) Test(org.testng.annotations.Test)

Example 9 with ValidatableResponse

use of io.restassured.response.ValidatableResponse in project molgenis by molgenis.

the class RestControllerV1APIIT method testGetEntityType.

@Test
public void testGetEntityType() {
    ValidatableResponse response = given().log().all().header(X_MOLGENIS_TOKEN, testUserToken).contentType(APPLICATION_JSON).when().get(API_V1 + "V1_API_TypeTestRefAPIV1/meta").then().log().all();
    validateGetEntityType(response);
}
Also used : ValidatableResponse(io.restassured.response.ValidatableResponse) Test(org.testng.annotations.Test)

Example 10 with ValidatableResponse

use of io.restassured.response.ValidatableResponse in project molgenis by molgenis.

the class RestControllerV1APIIT method testRetrieveEntityPost.

@Test
public void testRetrieveEntityPost() {
    ValidatableResponse response = given().log().all().header(X_MOLGENIS_TOKEN, testUserToken).contentType(APPLICATION_JSON).body(new EntityTypeRequest()).when().post(API_V1 + "V1_API_TypeTestRefAPIV1/ref1?_method=GET").then().log().all();
    validateRetrieveEntity(response);
}
Also used : ValidatableResponse(io.restassured.response.ValidatableResponse) EntityTypeRequest(org.molgenis.data.rest.EntityTypeRequest) Test(org.testng.annotations.Test)

Aggregations

ValidatableResponse (io.restassured.response.ValidatableResponse)33 Test (org.testng.annotations.Test)24 File (java.io.File)4 Path (java.nio.file.Path)3 EntityTypeRequest (org.molgenis.data.rest.EntityTypeRequest)3 Gson (com.google.gson.Gson)2 Response (io.restassured.response.Response)2 URL (java.net.URL)2 Matchers.containsString (org.hamcrest.Matchers.containsString)2 Test (org.junit.Test)2 EntityCollectionRequest (org.molgenis.data.rest.EntityCollectionRequest)2 JsonParseException (com.fasterxml.jackson.core.JsonParseException)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)1 ProcessingException (com.github.fge.jsonschema.core.exceptions.ProcessingException)1 JsonArray (com.google.gson.JsonArray)1 Param (de.ipk_gatersleben.bit.bi.bridge.brapicomp.testing.config.Param)1 RestAssured.baseURI (io.restassured.RestAssured.baseURI)1 RequestSpecification (io.restassured.specification.RequestSpecification)1 IOException (java.io.IOException)1