@@ -47,20 +47,23 @@ public void printSubmissionResultWorksIfResultIsNull() {
4747
4848 @ Test
4949 public void printSubmissionResultWorksIfAllTestsPass () {
50+ when (mockSubResult .getStatus ()).thenReturn (SubmissionResult .Status .OK );
5051 when (mockSubResult .getTestResultStatus ()).thenReturn (TestResultStatus .NONE_FAILED );
5152 printer .printSubmissionResult (mockSubResult , false , null , null );
5253 assertTrue (io .out ().contains ("All tests passed on server!" ));
5354 }
5455
5556 @ Test
5657 public void printSubmissionResultWorksIfAllTestsFail () {
58+ when (mockSubResult .getStatus ()).thenReturn (SubmissionResult .Status .FAIL );
5759 when (mockSubResult .getTestResultStatus ()).thenReturn (TestResultStatus .ALL_FAILED );
5860 printer .printSubmissionResult (mockSubResult , false , null , null );
5961 assertTrue (io .out ().contains ("All tests failed on server." ));
6062 }
6163
6264 @ Test
6365 public void printSubmissionResultWorksIfSomeTestsFail () {
66+ when (mockSubResult .getStatus ()).thenReturn (SubmissionResult .Status .FAIL );
6467 when (mockSubResult .getTestResultStatus ()).thenReturn (TestResultStatus .SOME_FAILED );
6568 printer .printSubmissionResult (mockSubResult , false , null , null );
6669 assertTrue (io .out ().contains ("Some tests failed on server." ));
@@ -73,7 +76,7 @@ public void printRunResultWorksIfTestsPass() {
7376 printer .printRunResult (runResult , false , null , null );
7477 assertTrue (io .out ().contains ("All tests passed!" ));
7578 }
76-
79+
7780 @ Test
7881 public void printRunResultWorksIfTestsFail () {
7982 testResults = ImmutableList .of (new TestResult ("test1" , false , "Not good." ,
@@ -82,7 +85,7 @@ public void printRunResultWorksIfTestsFail() {
8285 printer .printRunResult (runResult , false , null , null );
8386 assertTrue (io .out ().contains ("Please review your answer before submitting" ));
8487 }
85-
88+
8689 @ Test
8790 public void printRunResultWorksIfTestsFailWithException () {
8891 ImmutableList <String > points = ImmutableList .of ("1" );
@@ -93,7 +96,7 @@ public void printRunResultWorksIfTestsFailWithException() {
9396 printer .printRunResult (runResult , false , null , null );
9497 assertTrue (io .out ().contains ("Please review your answer before submitting" ));
9598 }
96-
99+
97100 @ Test
98101 public void printRunResultWorksIfCompilationFail () {
99102 testResults = ImmutableList .of ();
0 commit comments