Update the wiki with "assertThrows"
See original GitHub issueI think this wiki page https://github.com/junit-team/junit4/wiki/Exception-testing should be updated to mention also the new assertThrows
method.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Assert.Throws · nunit/docs Wiki - GitHub
Documentation for all active NUnit projects. Contribute to nunit/docs development by creating an account on GitHub.
Read more >JUnit 5: How to assert an exception is thrown? - Stack Overflow
You can use assertThrows() , which allows you to test multiple exceptions within the same test. With support for lambdas in Java 8,...
Read more >Module:ScribuntoUnit - Fandom Developers Wiki
function ScribuntoUnit:markTestSkipped( -- begin dev wiki change message ... "unknown error") function ScribuntoUnit:assertThrows(fn, expectedMessage, ...
Read more >student:junit:v5 [JMU CS Wiki]
There are several ways to test for thrown exceptions in JUnit. The most common is to use the assertThrows() method, but this approach...
Read more >How to migrate to JUnit 5 - OpenMRS Wiki
openmrs-core TRUNK-5811 - Update Junit from 4 to 5 Closed JUnit 5 tests have ... APIException.class ) with the assertThrows JUnit 4 method....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I moved the section about assertThrows() higher up on that wiki page, since that is our current recommended way for testing exceptions. I also added a note that explains why ExpectedExcetpion is deprecated.
@LorenzoBettini Thanks! I added a new section and a short note about
ExpectedException
now being deprecated.