@SneakyThrows public ResultActions salvarPagina(TipoPagina tipo, String id, String conteudo) { return mvc.perform( post("/editar/api/pagina/" + tipo.getNome() + "/" + id) .content(conteudo) .accept(ALL) .contentType(APPLICATION_XML)); }
@SneakyThrows public ResultActions editarPaginaNova(TipoPagina tipo) { return mvc.perform(get("/editar/api/pagina/" + tipo.getNome() + "/novo").accept(ALL)); }
@SneakyThrows public ResultActions editarPagina(TipoPagina tipo, String id) { return mvc.perform(get("/editar/api/pagina/" + tipo.getNome() + "/" + id).accept(ALL)); }
@SneakyThrows public ResultActions despublicarPagina(TipoPagina tipo, String id) { String url = format("/editar/api/pagina/" + tipo.getNome() + "/%s/despublicar", id); return mvc.perform(post(url).accept(ALL)); }