camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Babak Vahdat (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-5983) Avoid the negative-tests to behave as false-positve
Date Sun, 20 Jan 2013 10:34:12 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-5983?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Babak Vahdat updated CAMEL-5983:
--------------------------------

    Summary: Avoid the negative-tests to behave as false-positve  (was: Avoid negative-tests
to behave as false-positve)
    
> Avoid the negative-tests to behave as false-positve
> ---------------------------------------------------
>
>                 Key: CAMEL-5983
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5983
>             Project: Camel
>          Issue Type: Task
>          Components: tests
>    Affects Versions: 2.10.3
>            Reporter: Babak Vahdat
>
> We've got bunch of (negative) tests on the current codebase expecting a thrown {{XYZException}}
however they don't realize if the expected exception is *not* thrown, the typical pattern
for this is:
> {code}
> try {
>  doSomething_With_Expectation_Of_A_Thrown_XYZException();
> } catch (XYZException e) {
>  // expected
> }
> {code} 
> Which correctly should be:
> {code}
> try {
>  doSomething_With_Expectation_Of_A_Thrown_XYZException();
>  fail("Should have thrown an exception");
> } catch (XYZException e) {
>  // expected
> }
> {code} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message