From 12ebe0f16988daf87391f99f681a3e89b985d8c2 Mon Sep 17 00:00:00 2001 From: Julia McCauley Date: Fri, 16 Apr 2021 12:33:16 -0400 Subject: added followers field to holder objects, continued writing tests --- src/main/java/edu/brown/cs/student/term/hub/SuspicionRanker.java | 2 -- 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 him = r.getSuspicionScoreList(start, end); - //assertEquals(6, him.size()); + assertEquals(6, him.size()); for(Holder p: him){ System.out.println(p.toTestString()); } -- cgit v1.2.3-70-g09d2