Пример #1
0
  @Test
  public void testSerializeProject() throws Exception {
    ProjectConfig config = DtoConverter.asDto(pm.getProject("/fromConfig"));

    assertEquals("/fromConfig", config.getPath());
    assertEquals("primary1", config.getType());
  }
Пример #2
0
  protected void removeProject(ProjectConfig project) throws ServerException {

    final String href =
        UriBuilder.fromUri(apiEndpoint)
            .path(WorkspaceService.class)
            .path(WorkspaceService.class, "deleteProject")
            .build(workspaceId, project.getPath())
            .toString();
    try {
      httpJsonRequestFactory.fromUrl(href).useDeleteMethod().request();
    } catch (IOException | ApiException e) {
      throw new ServerException(e.getMessage());
    }
  }