use of ch.aaap.harvestclient.api.filter.ProjectFilter in project harvest-client by 3AP-AG.
the class ProjectsApiListTest method listByUpdated.
@Test
void listByUpdated() {
ProjectFilter filter = new ProjectFilter();
filter.setUpdatedSince(Instant.now());
List<Project> projects = projectsApi.list(filter);
assertThat(projects).isEmpty();
}
use of ch.aaap.harvestclient.api.filter.ProjectFilter in project harvest-client by 3AP-AG.
the class ProjectsApiListTest method listByClient.
@Test
void listByClient(TestInfo testInfo) {
project = projectsApi.create(ImmutableProject.builder().name("Project for " + testInfo.getDisplayName()).billable(true).billBy(Project.BillingMethod.PROJECT).budgetBy(Project.BudgetMethod.HOURS_PER_PROJECT).client(anotherClient).build());
ProjectFilter filter = new ProjectFilter();
filter.setClientReference(client);
List<Project> projects = projectsApi.list(filter);
assertThat(projects).doesNotContain(project);
}
use of ch.aaap.harvestclient.api.filter.ProjectFilter in project harvest-client by 3AP-AG.
the class ProjectsApiListTest method listByActive.
@Test
void listByActive(TestInfo testInfo) {
project = projectsApi.create(ImmutableProject.builder().name("Project for " + testInfo.getDisplayName()).billable(true).billBy(Project.BillingMethod.PROJECT).budgetBy(Project.BudgetMethod.HOURS_PER_PROJECT).active(false).client(ExistingData.getInstance().getClientReference()).build());
ProjectFilter filter = new ProjectFilter();
filter.setActive(false);
List<Project> projects = projectsApi.list(filter);
assertThat(projects).containsExactly(project);
}
Aggregations