aboutsummaryrefslogtreecommitdiff
path: root/ufund-api/src/test/java/com/ufund
diff options
context:
space:
mode:
authorGunther6070 <haydenhartman10@yahoo.com>2025-03-17 15:34:47 -0400
committerGunther6070 <haydenhartman10@yahoo.com>2025-03-17 15:34:47 -0400
commit6ff08c60b333960de48d6bcd720b4fa72eb0cba8 (patch)
treeabd6a6ff703500ff373226bcf6da8bb98c67c422 /ufund-api/src/test/java/com/ufund
parent0333def352ed9e9159b391ecbca60ffe358cd793 (diff)
downloadJellySolutions-6ff08c60b333960de48d6bcd720b4fa72eb0cba8.tar.gz
JellySolutions-6ff08c60b333960de48d6bcd720b4fa72eb0cba8.tar.bz2
JellySolutions-6ff08c60b333960de48d6bcd720b4fa72eb0cba8.zip
Added private to fields and modified setup method
Diffstat (limited to 'ufund-api/src/test/java/com/ufund')
-rw-r--r--ufund-api/src/test/java/com/ufund/api/ufundapi/persistence/CupboardFileDAOTest.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/ufund-api/src/test/java/com/ufund/api/ufundapi/persistence/CupboardFileDAOTest.java b/ufund-api/src/test/java/com/ufund/api/ufundapi/persistence/CupboardFileDAOTest.java
index 7888084..f786a8c 100644
--- a/ufund-api/src/test/java/com/ufund/api/ufundapi/persistence/CupboardFileDAOTest.java
+++ b/ufund-api/src/test/java/com/ufund/api/ufundapi/persistence/CupboardFileDAOTest.java
@@ -20,17 +20,18 @@ import com.ufund.api.ufundapi.model.Need.GoalType;
@Tag("Persistence-tier")
public class CupboardFileDAOTest {
- CupboardFileDAO cupboardFileDao;
- Need[] testNeeds;
- ObjectMapper mockObjectMapper;
+ private CupboardFileDAO cupboardFileDao;
+ private Need[] testNeeds;
+ private ObjectMapper mockObjectMapper;
@BeforeEach
public void setupCupboardFileDao() throws IOException {
mockObjectMapper = mock(ObjectMapper.class);
- testNeeds = new Need[3];
- testNeeds[0] = new Need("one", 0, 100, Need.GoalType.MONETARY);
- testNeeds[1] = new Need("two", 1, 100, Need.GoalType.MONETARY);
- testNeeds[2] = new Need("three", 2, 100, Need.GoalType.MONETARY);
+ testNeeds = new Need[]{
+ new Need("one", 0, 100, Need.GoalType.MONETARY),
+ new Need("two", 1, 100, Need.GoalType.MONETARY),
+ new Need("three", 2, 100, Need.GoalType.MONETARY)
+ };
// When the object mapper is supposed to read from the file
// the mock object mapper will return the hero array above
when(mockObjectMapper