Fixed How do I use Assert to verify that an exception has been thrown? #dev #it #asnwer
Fixed How do I use Assert to verify that an exception has been thrown? #dev #it #asnwer
How do I use Assert to verify that an exception has been thrown?
How do I use Assert (or other Test class?) to verify that an exception has been thrown?
Answer: How do I use Assert to verify that an exception has been thrown?
Usually your testing framework will have an answer for this. But if it’s not flexible enough, you can always do this:
try { somethingThatShouldThrowAnAcception();…
View On WordPress












