Beispiel #1
0
  @Test
  public void updateProject() {
    project.setName("JUnit Test Project");

    Project pr = jToggl.updateProject(project);

    Assert.assertNotNull(pr);
    Assert.assertTrue(pr.getName().equals("JUnit Test Project"));
  }
Beispiel #2
0
  private static Project createProject() {
    List<Project> projects = jToggl.getProjects();
    for (Project project : projects) {
      if ("JUnit Project".equals(project.getName())) {
        return project;
      }
    }

    Project pr = new Project();
    pr.setName("JUnit Project");
    pr.setCid(client.getId());

    List<Workspace> ws = jToggl.getWorkspaces();
    pr.setWorkspace(ws.get(0));

    pr = jToggl.createProject(pr);
    Assert.assertNotNull(pr);

    return pr;
  }