@Test public void getAllProjects() { controller.fetchProjects(); List<Project> projects = controller.getAllProjects(); assertFalse("Projects are empty", projects.isEmpty()); assertTrue("There are more than 10 projects", projects.size() > 10); }
@Override public List<Project> getAllProjects() { if (projects == null) { synchronized (this) { try { this.wait(10000); } catch (InterruptedException e) { } } } return projects; }
GitlabControllerImpl implements GitlabController { @Override public List<Project> getAllProjects() { if (projects == null) { synchronized (this) { try { this.wait(10000); } catch (InterruptedException e) { } } } return projects; } }
GitlabControllerImpl implements GitlabController { @Override public List<Project> getAllProjects() { if (projects == null) { synchronized (this) { try { this.wait(10000); } catch (InterruptedException e) { } } } return projects; } GitlabControllerImpl();  GitlabControllerImpl(boolean startFetchingProjects, boolean useCache);  GitlabControllerImpl(String token, boolean startFetchingProjects, boolean useCache); }
GitlabControllerImpl implements GitlabController { @Override public List<Project> getAllProjects() { if (projects == null) { synchronized (this) { try { this.wait(10000); } catch (InterruptedException e) { } } } return projects; } GitlabControllerImpl();  GitlabControllerImpl(boolean startFetchingProjects, boolean useCache);  GitlabControllerImpl(String token, boolean startFetchingProjects, boolean useCache); void runAfterFirstFetch(Runnable r); void startFetchingProjects(); @Override void stopFetchingProjects(); @Override List<Project> getAllProjects(); @Override Project gitlabToProject(GitlabProject project); static void main(String[] args); @Override Model getCheckedModel(byte modelData[], String modelType, String projectName); List<Project> getProjectsVisibleForUser(String mail); }
GitlabControllerImpl implements GitlabController { @Override public List<Project> getAllProjects() { if (projects == null) { synchronized (this) { try { this.wait(10000); } catch (InterruptedException e) { } } } return projects; } GitlabControllerImpl();  GitlabControllerImpl(boolean startFetchingProjects, boolean useCache);  GitlabControllerImpl(String token, boolean startFetchingProjects, boolean useCache); void runAfterFirstFetch(Runnable r); void startFetchingProjects(); @Override void stopFetchingProjects(); @Override List<Project> getAllProjects(); @Override Project gitlabToProject(GitlabProject project); static void main(String[] args); @Override Model getCheckedModel(byte modelData[], String modelType, String projectName); List<Project> getProjectsVisibleForUser(String mail); static final String GITLAB_URL_KEY; static final String GITLAB_TOKEN_KEY; }