use of org.eclipse.vorto.repository.web.api.v1.dto.ModelLink in project vorto by eclipse.
the class IntegrationTestBase method deleteLink.
protected ResultActions deleteLink(String modelId, SecurityMockMvcRequestPostProcessors.UserRequestPostProcessor user, ModelLink url) throws Exception {
MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.delete("/api/v1/attachments/" + modelId + "/links");
builder.content(ObjectMapperFactory.getInstance().writeValueAsString(url));
return repositoryServer.perform(builder.with(request -> {
request.setMethod("DELETE");
return request;
}).contentType(MediaType.APPLICATION_JSON).with(user));
}
Aggregations