Loading ...
Sorry, an error occurred while loading the content.

Re: [junit] false positives with expected=AnException.class?

Expand Messages
  • J. B. Rainsberger
    ... Yes. What could you do to avoid that problem? -- J. B. (Joe) Rainsberger :: http://www.jbrains.info Your guide to software craftsmanship JUnit Recipes:
    Message 1 of 4 , Jun 29, 2006
    • 0 Attachment
      berndq wrote:

      > I can see that this is nicer than a try/fail/catch construct.
      >
      > But what if the same exception type is thrown from another place
      > than the expected one (inside the same test method)? Can't we have false
      > positives then?

      Yes. What could you do to avoid that problem?
      --
      J. B. (Joe) Rainsberger :: http://www.jbrains.info
      Your guide to software craftsmanship
      JUnit Recipes: Practical Methods for Programmer Testing
      2005 Gordon Pask Award for contribution Agile Software Practice
    Your message has been successfully submitted and would be delivered to recipients shortly.