New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make MultipleFailuresError immutable #33
Comments
gaganis
added a commit
to gaganis/opentest4j
that referenced
this issue
Feb 24, 2017
Make MFE immutable by only accepting failures via a List constructor parameter. This also changes the type of failures from AssertionError to Throwable so this class can be used by the Vintage engine to report multiple failures for JUnit4 tests using ErrorCollector for so it can be used to resovle junit-team/junit5#659. Resolves: ota4j-team#30, ota4j-team#33 See also: junit-team/junit5#659
gaganis
added a commit
to gaganis/opentest4j
that referenced
this issue
Feb 24, 2017
Make MFE immutable by only accepting failures via a List constructor parameter. Move null check for failure elements during construction as this would fail with an NPE at getMessage(). Also change the type of failures from AssertionError to Throwable so this class can be used by the Vintage engine to report multiple failures for JUnit4 tests using ErrorCollector so it can be used to resovle junit-team/junit5#659. Resolves: ota4j-team#30, ota4j-team#33 See also: junit-team/junit5#659
The discussion that led to the creation of this issue can be found in PR #32 |
marcphilipp
pushed a commit
that referenced
this issue
Feb 24, 2017
Make MFE immutable by only accepting failures via a List constructor parameter. Move null check for failure elements during construction as this would fail with an NPE at getMessage(). Also change the type of failures from AssertionError to Throwable so this class can be used by the Vintage engine to report multiple failures for JUnit4 tests using ErrorCollector so it can be used to resolve junit-team/junit5#659. Resolves: #30, #33 See also: junit-team/junit5#659 Closes #34
Fixed by 1a88682. |
6 tasks
gaganis
added a commit
to gaganis/junit5
that referenced
this issue
Feb 24, 2017
Please note for this to build succesfuly an upstream build of opentest4j containing fix ota4j-team/opentest4j#34 is required. Fix Vintage engine only storing and reporting only one in case of many failures as is the case when using JUnit4 ErrorCollector rule. Use the new Immutable implementation of MultipleFailuresError to report the multiple failures. Also fix AssertAll to use the new immutable MFE. Resolves: junit-team#659 See also: ota4j-team/opentest4j#30, ota4j-team/opentest4j#33
gaganis
added a commit
to gaganis/junit5
that referenced
this issue
Feb 24, 2017
Change ota4jVersion to 1.0.0-SNAPSHOT because fix ota4j-team/opentest4j#34 is required for this to build succesfully. Fix Vintage engine only storing and reporting only one in case of many failures as is the case when using JUnit4 ErrorCollector rule. Use the new Immutable implementation of MultipleFailuresError to report the multiple failures. Also fix AssertAll to use the new immutable MFE. Resolves: junit-team#659 See also: ota4j-team/opentest4j#30, ota4j-team/opentest4j#33
marcphilipp
pushed a commit
to junit-team/junit5
that referenced
this issue
Feb 26, 2017
Change ota4jVersion to 1.0.0-SNAPSHOT because fix ota4j-team/opentest4j#34 is required for this to build succesfully. Fix Vintage engine only storing and reporting only one in case of many failures as is the case when using JUnit4 ErrorCollector rule. Use the new Immutable implementation of MultipleFailuresError to report the multiple failures. Also fix AssertAll to use the new immutable MFE. Resolves: #659 See also: ota4j-team/opentest4j#30, ota4j-team/opentest4j#33
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Exceptions should generally be immutable. Thus we should replace
addFailure()
by a constructor parameter of typeList<? extends Throwable>
, copy it and assign it tofailures
.The text was updated successfully, but these errors were encountered: