ota4j-team / opentest4j

Open Test Alliance for the JVM
Apache License 2.0
279 stars 37 forks source link

Change MultipleFailuresError to support Throwables #31

Closed gaganis closed 7 years ago

gaganis commented 7 years ago

As individual failures had to be childs of AssertionError this made MultipleFailuresError unsuitable for JUnit4 tests using ErrorCollector which can register multiple failures of type Throwable.

Also adds a null check for throwables in getMessage(). Each added throwable is -in essence- mapped to an instance created with org.junit.platform.engine.TestExecutionResult.failed() which is very clearly documented to accept null values. In that case the message method would crash.

Resolves: #30, junit-team/junit5#659


I hereby agree to the terms of the Open Test Alliance Contributor License Agreement.

gaganis commented 7 years ago

Forgot to run spotless :( trying again...