use of ch.aaap.harvestclient.domain.param.ExpenseUpdateInfo in project harvest-client by 3AP-AG.
the class ExpensesApiUpdateTest method changeAll.
@Test
void changeAll() {
String name = "test Expense";
boolean billableByDefault = false;
double defaultHourlyRate = 220.2;
boolean defaultAddToFutureProject = true;
boolean active = false;
ExpenseUpdateInfo changes = ImmutableExpenseUpdateInfo.builder().project(project).expenseCategory(expenseCategory).totalCost(55.).spentDate(LocalDate.of(2001, 1, 1)).build();
Expense updatedExpense = expensesApi.update(expense, changes);
assertThat(updatedExpense).usingComparatorForType(Comparator.comparing(Reference::getId), Reference.class).isEqualToComparingOnlyGivenFields(changes, "project", "expenseCategory", "totalCost", "spentDate");
}
Aggregations