diff options
author | sowgro <tpoke.ferrari@gmail.com> | 2025-03-17 23:16:29 -0400 |
---|---|---|
committer | sowgro <tpoke.ferrari@gmail.com> | 2025-03-17 23:16:29 -0400 |
commit | 68515441acd77d3356e8ec8b58700411661fec13 (patch) | |
tree | f3e08e4eecb5c06c8149d56ca08253a3c2d92607 /ufund-api/src/test/java/com/ufund/api/ufundapi/model/NeedTest.java | |
parent | 7a5c5073e9e410b3ccc3ab7902a0d6f558277c7d (diff) | |
parent | 275a6062007380389b7a8f1b8958e8033b4f0925 (diff) | |
download | JellySolutions-68515441acd77d3356e8ec8b58700411661fec13.tar.gz JellySolutions-68515441acd77d3356e8ec8b58700411661fec13.tar.bz2 JellySolutions-68515441acd77d3356e8ec8b58700411661fec13.zip |
Merge remote-tracking branch 'refs/remotes/origin/main' into funding_basket
# Conflicts:
# ufund-ui/src/app/components/funding-basket/funding-basket.component.ts
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 | 25 |
1 files changed, 9 insertions, 16 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 ffcd808..6b4ddfc 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,13 +14,10 @@ public class NeedTest { public void createNeed() { String name = "Jellyfish"; - int id = 0; double maxGoal = 100.00; GoalType type = GoalType.MONETARY; - Need need = new Need(name, id, maxGoal, type); - + Need need = new Need(name, type, maxGoal); assertNotNull(need); - } @Test @@ -29,7 +26,7 @@ public class NeedTest { int id = 0; double maxGoal = 100.00; GoalType type = GoalType.MONETARY; - Need need = new Need(name, id, maxGoal, type); + Need need = new Need(name, type, maxGoal); assertEquals(name, need.getName()); @@ -41,22 +38,21 @@ public class NeedTest { @Test public void testCurrentGoal() { String name = "Jellyfish"; - int id = 0; double maxGoal = 100.00; GoalType type = GoalType.MONETARY; - Need need = new Need(name, id, maxGoal, type); + Need need = new Need(name, type, maxGoal); double current = 0.00; need.setCurrent(current); - assertEquals(need.getCurrent(), current); + assertEquals(current, need.getCurrent()); current = 100.00; need.setCurrent(current); - assertEquals(need.getCurrent(), current); + assertEquals(current, need.getCurrent()); current = -100.00; need.setCurrent(current); - assertEquals(need.getCurrent(), current); + assertEquals(current, need.getCurrent()); } @@ -64,10 +60,9 @@ public class NeedTest { public void testFilterAttributes() { String name = "Jellyfish"; - int id = 0; double maxGoal = 100.00; GoalType type = GoalType.MONETARY; - Need need = new Need(name, id, maxGoal, type); + Need need = new Need(name, type, maxGoal); String[] filterAttributes = {"seaweed", "divers", "pacific", "plankton"}; @@ -80,10 +75,9 @@ public class NeedTest { public void testSetMaxGoal() { String name = "Jellyfish"; - int id = 0; double maxGoal = 100.00; GoalType type = GoalType.MONETARY; - Need need = new Need(name, id, maxGoal, type); + Need need = new Need(name, type, maxGoal); double newGoal = 200.00; need.setMaxGoal(newGoal); @@ -96,10 +90,9 @@ public class NeedTest { public void testSetName() { String name = "Jellyfish"; - int id = 0; double maxGoal = 100.00; GoalType type = GoalType.MONETARY; - Need need = new Need(name, id, maxGoal, type); + Need need = new Need(name, type, maxGoal); String newName = "TESTINGFUN"; need.setName(newName); |