Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9E0D9EA65 for ; Mon, 21 Jan 2013 20:52:13 +0000 (UTC) Received: (qmail 99888 invoked by uid 500); 21 Jan 2013 20:52:13 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 99865 invoked by uid 500); 21 Jan 2013 20:52:13 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 99857 invoked by uid 99); 21 Jan 2013 20:52:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Jan 2013 20:52:13 +0000 Date: Mon, 21 Jan 2013 20:52:13 +0000 (UTC) From: "Babak Vahdat (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CAMEL-5983) Avoid the negative-tests to behave as false-positive MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-5983?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Babak Vahdat resolved CAMEL-5983. --------------------------------- Resolution: Fixed All the remaining tests being mentioned by the previous post have been now fixed as well. > Avoid the negative-tests to behave as false-positive > ---------------------------------------------------- > > 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 > Assignee: Babak Vahdat > Fix For: 2.10.4, 2.11.0 > > Attachments: CAMEL-5983-partial.patch > > > 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