Permalink
Browse files

Fix broken tests.

  • Loading branch information...
1 parent 6bdb1dc commit f833c885988bfb12c76b5f3d9251ce057863893f Stuart Childs committed Apr 27, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/com/example/classproject/HelloWorldTest.java
@@ -3,6 +3,7 @@
import org.junit.Test;
import java.io.*;
+import java.util.Arrays;
import static org.junit.Assert.*;
@@ -60,9 +61,8 @@ public void testPrintsCorrectStory() {
System.setOut(new PrintStream(output));
try {
- HelloWorld.runProgram("story/story.txt", input);
+ HelloWorld.runProgram("story/dummy.txt", input);
String outputString = output.toString();
-// assertEquals("", outputString);
boolean contains = outputString.contains(text);
assertTrue(contains);
} catch (IOException e) {
@@ -106,7 +106,7 @@ public void runProgramPrintsAnErrorIfUserInputDoesNotValidate() {
System.setOut(new PrintStream(output));
try {
- HelloWorld.runProgram("story/story.txt", input);
+ HelloWorld.runProgram("story/dummy.txt", input);
assertTrue(output.toString().contains("Invalid selection: 'b'"));
} catch (IOException e) {
fail(e.getMessage());

0 comments on commit f833c88

Please sign in to comment.