summaryrefslogtreecommitdiff
path: root/src/Q4/RandomSumGameTest.java
diff options
context:
space:
mode:
authormo <mo.khan@gmail.com>2019-06-18 16:44:53 -0600
committermo <mo.khan@gmail.com>2019-06-18 16:44:53 -0600
commitf9ce5bc529295696c841afc7c17c5b61083a8082 (patch)
tree54f0249d54c94c9a391e3df82ae81713023c1b18 /src/Q4/RandomSumGameTest.java
parent82589bb93e5b3d7a4c99394c1486c08e1d63eec4 (diff)
try to create a testable API using constructor injection
Diffstat (limited to 'src/Q4/RandomSumGameTest.java')
-rw-r--r--src/Q4/RandomSumGameTest.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Q4/RandomSumGameTest.java b/src/Q4/RandomSumGameTest.java
index 3a5e26c..41c0923 100644
--- a/src/Q4/RandomSumGameTest.java
+++ b/src/Q4/RandomSumGameTest.java
@@ -1,6 +1,7 @@
package ca.mokhan.test;
import Q4.*;
+import java.io.*;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
@@ -10,7 +11,7 @@ public class RandomSumGameTest extends TestCase {
public RandomSumGameTest(String testName) {
super(testName);
- this.subject = new RandomSumGame();
+ this.subject = new RandomSumGame(new PrintStream(new ByteArrayOutputStream()));
}
public static Test suite() {