diff options
Diffstat (limited to 'ufund-api/src/test/java/com')
| -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  | 
