diff options
author | Tyler Ferrari <69283684+Sowgro@users.noreply.github.com> | 2025-04-01 02:17:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-01 02:17:25 -0400 |
commit | 233fe120d2a9b30e0150401ebdfeb946dc9c2c07 (patch) | |
tree | 98583e1b1d21d1a0cc57e8ff3489fbbf758eccff /ufund-api/src/test/java/com/ufund/api/ufundapi/model/NeedTest.java | |
parent | c6bbb29f42eaea7d0c8aebdb7b95be0287cbf4f9 (diff) | |
parent | 0e9c0803e35a23ef2e873dc7ebf224a49a92f207 (diff) | |
download | JellySolutions-233fe120d2a9b30e0150401ebdfeb946dc9c2c07.tar.gz JellySolutions-233fe120d2a9b30e0150401ebdfeb946dc9c2c07.tar.bz2 JellySolutions-233fe120d2a9b30e0150401ebdfeb946dc9c2c07.zip |
Merge pull request #22 from RIT-SWEN-261-02/css
Merge css into main
Diffstat (limited to 'ufund-api/src/test/java/com/ufund/api/ufundapi/model/NeedTest.java')
-rw-r--r-- | ufund-api/src/test/java/com/ufund/api/ufundapi/model/NeedTest.java | 63 |
1 files changed, 43 insertions, 20 deletions
diff --git a/ufund-api/src/test/java/com/ufund/api/ufundapi/model/NeedTest.java b/ufund-api/src/test/java/com/ufund/api/ufundapi/model/NeedTest.java index 6b4ddfc..67d2b8f 100644 --- a/ufund-api/src/test/java/com/ufund/api/ufundapi/model/NeedTest.java +++ b/ufund-api/src/test/java/com/ufund/api/ufundapi/model/NeedTest.java @@ -14,23 +14,30 @@ public class NeedTest { public void createNeed() { String name = "Jellyfish"; - double maxGoal = 100.00; - GoalType type = GoalType.MONETARY; - Need need = new Need(name, type, maxGoal); + String location = "Atlantis"; + double maxGoal = 100.0; + GoalType type = Need.GoalType.MONETARY; + boolean urgent = false; + String image = ""; + String description = ""; + var need = new Need(name, location, image, maxGoal, type, urgent, description); assertNotNull(need); } @Test public void testFields() { String name = "Jellyfish"; - int id = 0; - double maxGoal = 100.00; - GoalType type = GoalType.MONETARY; - Need need = new Need(name, type, maxGoal); + String location = "Atlantis"; + double maxGoal = 100.0; + GoalType type = Need.GoalType.MONETARY; + boolean urgent = false; + String image = ""; + String description = ""; + var need = new Need(name, location, image, maxGoal, type, urgent, description); assertEquals(name, need.getName()); - assertEquals(id, need.getId()); + assertEquals(0, need.getId()); assertEquals(maxGoal, need.getMaxGoal()); assertEquals(type, need.getType()); } @@ -38,9 +45,13 @@ public class NeedTest { @Test public void testCurrentGoal() { String name = "Jellyfish"; - double maxGoal = 100.00; - GoalType type = GoalType.MONETARY; - Need need = new Need(name, type, maxGoal); + String location = "Atlantis"; + double maxGoal = 100.0; + GoalType type = Need.GoalType.MONETARY; + boolean urgent = false; + String image = ""; + String description = ""; + var need = new Need(name, location, image, maxGoal, type, urgent, description); double current = 0.00; need.setCurrent(current); @@ -60,9 +71,13 @@ public class NeedTest { public void testFilterAttributes() { String name = "Jellyfish"; - double maxGoal = 100.00; - GoalType type = GoalType.MONETARY; - Need need = new Need(name, type, maxGoal); + String location = "Atlantis"; + double maxGoal = 100.0; + GoalType type = Need.GoalType.MONETARY; + boolean urgent = false; + String image = ""; + String description = ""; + var need = new Need(name, location, image, maxGoal, type, urgent, description); String[] filterAttributes = {"seaweed", "divers", "pacific", "plankton"}; @@ -75,9 +90,13 @@ public class NeedTest { public void testSetMaxGoal() { String name = "Jellyfish"; - double maxGoal = 100.00; - GoalType type = GoalType.MONETARY; - Need need = new Need(name, type, maxGoal); + String location = "Atlantis"; + double maxGoal = 100.0; + GoalType type = Need.GoalType.MONETARY; + boolean urgent = false; + String image = ""; + String description = ""; + var need = new Need(name, location, image, maxGoal, type, urgent, description); double newGoal = 200.00; need.setMaxGoal(newGoal); @@ -90,9 +109,13 @@ public class NeedTest { public void testSetName() { String name = "Jellyfish"; - double maxGoal = 100.00; - GoalType type = GoalType.MONETARY; - Need need = new Need(name, type, maxGoal); + String location = "Atlantis"; + double maxGoal = 100.0; + GoalType type = Need.GoalType.MONETARY; + boolean urgent = false; + String image = ""; + String description = ""; + var need = new Need(name, location, image, maxGoal, type, urgent, description); String newName = "TESTINGFUN"; need.setName(newName); |