From 1b1c1ce3121c6c0297a585e3c89e997d8b32eed9 Mon Sep 17 00:00:00 2001 From: effe Date: Thu, 12 Sep 2024 19:54:25 -0400 Subject: [PATCH] refactor: tests --- .../com/application/munera/services/ExpenseServiceTest.java | 2 +- .../com/application/munera/services/PersonServiceTest.java | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/test/java/com/application/munera/services/ExpenseServiceTest.java b/src/test/java/com/application/munera/services/ExpenseServiceTest.java index 0b2e126..3008c96 100644 --- a/src/test/java/com/application/munera/services/ExpenseServiceTest.java +++ b/src/test/java/com/application/munera/services/ExpenseServiceTest.java @@ -41,7 +41,7 @@ class ExpenseServiceTest { } @Test - public void testFetchExpensesForDashboard_NoExpenses() { + void testFetchExpensesForDashboard_NoExpenses() { when(expenseRepository.findExpensesByPayerAndBeneficiaryAndYear(loggedInPerson.getId(), year.getValue())) .thenReturn(new ArrayList<>()); when(expenseRepository.findExpensesByBeneficiaryAndYear(loggedInPerson.getId(), year.getValue())) diff --git a/src/test/java/com/application/munera/services/PersonServiceTest.java b/src/test/java/com/application/munera/services/PersonServiceTest.java index a5715b0..c176d59 100644 --- a/src/test/java/com/application/munera/services/PersonServiceTest.java +++ b/src/test/java/com/application/munera/services/PersonServiceTest.java @@ -38,10 +38,6 @@ class PersonServiceTest { person2.setLastName("second"); person2.setFirstName("person"); -// Person person3 = new Person(); -// person3.setLastName("third"); -// person3.setFirstName("person"); - Expense expense1 = mock(Expense.class); when(expense1.getPayer()).thenReturn(person); when(expense1.getBeneficiary()).thenReturn(person2); @@ -180,5 +176,4 @@ class PersonServiceTest { // Assert assertEquals(new BigDecimal("-50.00"), totalDebt); } - } \ No newline at end of file