use of io.restassured.response.ValidatableResponse in project bisq-api by mrosseel.
the class ApiTestHelper method registerArbitrator.
public static ValidatableResponse registerArbitrator(int apiPort) throws InterruptedException {
final ValidatableResponse validatableResponse = given().port(apiPort).when().body("{\"languageCodes\":[\"en\",\"de\"]}").contentType(ContentType.JSON).post("/api/v1/arbitrators").then().statusCode(204);
/* Wait for arbiter registration message to be broadcast across peers*/
waitForP2PMsgPropagation();
return validatableResponse;
}
use of io.restassured.response.ValidatableResponse in project molgenis by molgenis.
the class RestControllerV2APIIT method testRetrieveEntityCollectionPost.
@Test
public void testRetrieveEntityCollectionPost() {
ValidatableResponse response = given().log().all().header(X_MOLGENIS_TOKEN, testUserToken).post(API_V2 + "V2_API_TypeTestRefAPIV2?_method=GET").then().log().all();
validateRetrieveEntityCollection(response);
}
use of io.restassured.response.ValidatableResponse in project molgenis by molgenis.
the class RestControllerV2APIIT method testRetrieveEntityAttributeMetaPost.
@Test
public void testRetrieveEntityAttributeMetaPost() {
ValidatableResponse response = given().log().all().header(X_MOLGENIS_TOKEN, testUserToken).post(API_V2 + "V2_API_TypeTestRefAPIV2/meta/value?_method=GET").then().log().all();
validateRetrieveEntityAttributeMeta(response);
}
use of io.restassured.response.ValidatableResponse in project molgenis by molgenis.
the class RestControllerV2APIIT method testRetrieveEntityWithoutSettingCategoriesResultsInNoCategoricalOptions.
@Test
public void testRetrieveEntityWithoutSettingCategoriesResultsInNoCategoricalOptions() {
ValidatableResponse response = given().log().all().header(X_MOLGENIS_TOKEN, testUserToken).param("attrs", newArrayList("xcategorical_value")).get(API_V2 + "V2_API_TypeTestAPIV2/1").then().log().all();
response.statusCode(OKE);
response.body("_meta.attributes[0].categoricalOptions", Matchers.nullValue());
}
use of io.restassured.response.ValidatableResponse in project molgenis by molgenis.
the class RestControllerV2APIIT method testRetrieveEntityCollection.
@Test
public void testRetrieveEntityCollection() {
ValidatableResponse response = given().log().all().header(X_MOLGENIS_TOKEN, testUserToken).get(API_V2 + "V2_API_TypeTestRefAPIV2").then().log().all();
validateRetrieveEntityCollection(response);
}
Aggregations