5 Replies Latest reply on Sep 25, 2008 2:52 AM by cbeust

    How to test agains Exceptions using TestNg

    accless

      Hi,


      i would like to do testing against an (expected) exception. According to testng doc i can use the ExpectedException-Annotation. But unfortunately this annotation isnt properly honored in my testcases. Firstly the annotation is marked as deprecated, secondly throwing the expected exception causes an assertionError.


      Does anybody know a solution?


      Greetings.