diff options
author | Tyler Ferrari <69283684+Sowgro@users.noreply.github.com> | 2025-03-17 16:44:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-17 16:44:16 -0400 |
commit | ed3d0e5e5f9c58c3926ea55a422212f4da1c8849 (patch) | |
tree | a33f760bb831c948ebf1844ca52d7625ca7f6fe7 /ufund-api/src/test/java/com/ufund/api/ufundapi/persistence/CupboardFileDAOTest.java | |
parent | 9baaa0590fbc38c06d530786a1de804ee9edd7db (diff) | |
parent | 0377515c685b3ced5f67ae6d2ffee22893943acb (diff) | |
download | JellySolutions-ed3d0e5e5f9c58c3926ea55a422212f4da1c8849.tar.gz JellySolutions-ed3d0e5e5f9c58c3926ea55a422212f4da1c8849.tar.bz2 JellySolutions-ed3d0e5e5f9c58c3926ea55a422212f4da1c8849.zip |
Merge pull request #9 from RIT-SWEN-261-02/service-tests
service-tests merge
Diffstat (limited to 'ufund-api/src/test/java/com/ufund/api/ufundapi/persistence/CupboardFileDAOTest.java')
-rw-r--r-- | ufund-api/src/test/java/com/ufund/api/ufundapi/persistence/CupboardFileDAOTest.java | 15 |
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 |