Skip to content

Commit

Permalink
Merge pull request #871 from clumsy/#177
Browse files Browse the repository at this point in the history
fixes #177
  • Loading branch information
kcooney committed Apr 12, 2014
2 parents dbfd4fa + 96cfed7 commit e65558c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ public class ErrorReportingRunner extends Runner {
private final Class<?> fTestClass;

public ErrorReportingRunner(Class<?> testClass, Throwable cause) {
if (testClass == null) {
throw new NullPointerException("Test class cannot be null");
}
fTestClass = testClass;
fCauses = getCauses(cause);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package org.junit.tests.internal.runners;

import org.junit.Test;
import org.junit.internal.runners.ErrorReportingRunner;

public class ErrorReportingRunnerTest {
@Test(expected = NullPointerException.class)
public void cannotCreateWithNullClass() {
new ErrorReportingRunner(null, new RuntimeException());
}
}

0 comments on commit e65558c

Please sign in to comment.