aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/edu/brown/cs/student/SuspicionRankerTest.java
diff options
context:
space:
mode:
authorJulia McCauley <skurvyj@gmail.com>2021-04-16 11:17:54 -0400
committerJulia McCauley <skurvyj@gmail.com>2021-04-16 11:17:54 -0400
commit39f6e10710e5ca0cfbffff596afdebfc04426051 (patch)
treed2df6e3b0289378fb82ea5d45eb71fb2f6ab4fe7 /src/test/java/edu/brown/cs/student/SuspicionRankerTest.java
parent706b0549ad2d6f160f9260cd9840ba4245800f49 (diff)
intermediate commit to pull new changes
Diffstat (limited to 'src/test/java/edu/brown/cs/student/SuspicionRankerTest.java')
-rw-r--r--src/test/java/edu/brown/cs/student/SuspicionRankerTest.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/test/java/edu/brown/cs/student/SuspicionRankerTest.java b/src/test/java/edu/brown/cs/student/SuspicionRankerTest.java
index d641507..bc9b339 100644
--- a/src/test/java/edu/brown/cs/student/SuspicionRankerTest.java
+++ b/src/test/java/edu/brown/cs/student/SuspicionRankerTest.java
@@ -10,8 +10,11 @@ import org.junit.Before;
import org.junit.Test;
import java.time.Instant;
+import java.util.Comparator;
import java.util.List;
import java.util.Map;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
public class SuspicionRankerTest {
@@ -27,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???");
}
@@ -39,14 +42,13 @@ public class SuspicionRankerTest {
}
@Test
- public void testMapper(){
+ public void testSuspicionRanksOnMockData(){
setUp();
SuspicionRanker r = new SuspicionRanker(db);
List<Holder> him = r.getSuspicionScoreList(start, end);
- //System.out.println(him);
- for(Holder guy: him){
- System.out.println(guy.getName() + " " + guy.getSuspicionScore());
- }
+ assertEquals(6, him.size());
tearDown();
}
+
+
}