use of org.entando.entando.aps.system.services.oauth2.model.ApiConsumer in project entando-core by entando.
the class ApiConsumerControllerTest method testValidationErrorPost.
private ResultActions testValidationErrorPost(Consumer<ApiConsumer> consumer) throws Exception {
ApiConsumer apiConsumer = getValidPayload();
consumer.accept(apiConsumer);
ResultActions result = authRequest(post(BASE_URL).content(jsonMapper.writeValueAsString(apiConsumer)));
result.andExpect(status().is4xxClientError()).andExpect(jsonPath("$.errors", hasSize(1)));
return result;
}
use of org.entando.entando.aps.system.services.oauth2.model.ApiConsumer in project entando-core by entando.
the class ApiConsumerControllerTest method getValidPayload.
private ApiConsumer getValidPayload() {
ApiConsumer apiConsumer = new ApiConsumer();
apiConsumer.setKey("valid_key");
apiConsumer.setName("name");
apiConsumer.setSecret("secret");
apiConsumer.setDescription("description");
apiConsumer.setExpirationDate("2020-01-01 00:00:00");
return apiConsumer;
}
Aggregations