diff options
| author | Gunther6070 <haydenhartman10@yahoo.com> | 2025-03-17 15:34:47 -0400 | 
|---|---|---|
| committer | Gunther6070 <haydenhartman10@yahoo.com> | 2025-03-17 15:34:47 -0400 | 
| commit | 6ff08c60b333960de48d6bcd720b4fa72eb0cba8 (patch) | |
| tree | abd6a6ff703500ff373226bcf6da8bb98c67c422 /ufund-api/src/test/java/com/ufund | |
| parent | 0333def352ed9e9159b391ecbca60ffe358cd793 (diff) | |
| download | JellySolutions-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.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  | 
