diff options
author | Julia McCauley <skurvyj@gmail.com> | 2021-04-16 12:33:16 -0400 |
---|---|---|
committer | Julia McCauley <skurvyj@gmail.com> | 2021-04-16 12:33:16 -0400 |
commit | 12ebe0f16988daf87391f99f681a3e89b985d8c2 (patch) | |
tree | 002f713f65ecec76dced8c1d5b07b6619e6ee37a /src | |
parent | 7cec7d66f19f8da453c330fe92e8ce9bef5b6753 (diff) |
added followers field to holder objects, continued writing tests
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/edu/brown/cs/student/term/hub/SuspicionRanker.java | 2 | ||||
-rw-r--r-- | src/test/java/edu/brown/cs/student/SuspicionRankerTest.java | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/main/java/edu/brown/cs/student/term/hub/SuspicionRanker.java b/src/main/java/edu/brown/cs/student/term/hub/SuspicionRanker.java index b52a47a..fd214fd 100644 --- a/src/main/java/edu/brown/cs/student/term/hub/SuspicionRanker.java +++ b/src/main/java/edu/brown/cs/student/term/hub/SuspicionRanker.java @@ -45,8 +45,6 @@ public class SuspicionRanker { profitMax = Math.abs(getMinOfMap(profitMap)); } - System.out.println("the max: " + profitMax); - /*if both the min we found and max we found are 0, then we have the special case where all the values are 0, in which case we need to avoid dividing by 0*/ diff --git a/src/test/java/edu/brown/cs/student/SuspicionRankerTest.java b/src/test/java/edu/brown/cs/student/SuspicionRankerTest.java index 266eb30..cb0fc6f 100644 --- a/src/test/java/edu/brown/cs/student/SuspicionRankerTest.java +++ b/src/test/java/edu/brown/cs/student/SuspicionRankerTest.java @@ -30,7 +30,7 @@ public class SuspicionRankerTest { @Before public void setUp() { try{ - db = new DatabaseQuerier("data/trades.sqlite3"); + db = new DatabaseQuerier("data/lil_mock.sqlite3"); } catch(Exception e){ System.out.println("DBQuerier Test, couldn't connect to db???"); } @@ -46,7 +46,7 @@ public class SuspicionRankerTest { setUp(); SuspicionRanker r = new SuspicionRanker(db); List<Holder> him = r.getSuspicionScoreList(start, end); - //assertEquals(6, him.size()); + assertEquals(6, him.size()); for(Holder p: him){ System.out.println(p.toTestString()); } |