Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 50104 invoked from network); 30 Dec 2007 23:43:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Dec 2007 23:43:22 -0000 Received: (qmail 3677 invoked by uid 500); 30 Dec 2007 23:43:11 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 3646 invoked by uid 500); 30 Dec 2007 23:43:11 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 3635 invoked by uid 99); 30 Dec 2007 23:43:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Dec 2007 15:43:10 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Dec 2007 23:43:06 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 9C2251A9838; Sun, 30 Dec 2007 15:42:57 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r607618 - in /directory/sandbox/felixk/studio-plugin/src/test: java/org/apache/directory/studio/maven/plugins/StudioCleanMojoTest.java resources/unit/basic-clean-test/plugin-exception-pom.xml Date: Sun, 30 Dec 2007 23:42:57 -0000 To: commits@directory.apache.org From: felixk@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071230234257.9C2251A9838@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: felixk Date: Sun Dec 30 15:42:43 2007 New Revision: 607618 URL: http://svn.apache.org/viewvc?rev=607618&view=rev Log: Add test for exception Added: directory/sandbox/felixk/studio-plugin/src/test/resources/unit/basic-clean-test/plugin-exception-pom.xml (with props) Modified: directory/sandbox/felixk/studio-plugin/src/test/java/org/apache/directory/studio/maven/plugins/StudioCleanMojoTest.java Modified: directory/sandbox/felixk/studio-plugin/src/test/java/org/apache/directory/studio/maven/plugins/StudioCleanMojoTest.java URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-plugin/src/test/java/org/apache/directory/studio/maven/plugins/StudioCleanMojoTest.java?rev=607618&r1=607617&r2=607618&view=diff ============================================================================== --- directory/sandbox/felixk/studio-plugin/src/test/java/org/apache/directory/studio/maven/plugins/StudioCleanMojoTest.java (original) +++ directory/sandbox/felixk/studio-plugin/src/test/java/org/apache/directory/studio/maven/plugins/StudioCleanMojoTest.java Sun Dec 30 15:42:43 2007 @@ -79,6 +79,28 @@ /** + * Tests for exception hanndling - an exception should only be logged, but not be thrown + * + * @throws Exception + */ + public void testBasicCleanException() throws Exception + { + String pluginPom = getBasedir() + "/src/test/resources/unit/basic-clean-test/plugin-exception-pom.xml"; + StudioCleanMojo mojo = ( StudioCleanMojo ) lookupMojo( "clean", pluginPom ); + assertNotNull( mojo ); + + try + { + mojo.execute(); + } + catch ( Exception e ) + { + fail( "Exception thrown: " + e.toString() ); + } + } + + + /** * @param dir a dir or a file * @return true if a file/dir exists, false otherwise */ Added: directory/sandbox/felixk/studio-plugin/src/test/resources/unit/basic-clean-test/plugin-exception-pom.xml URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-plugin/src/test/resources/unit/basic-clean-test/plugin-exception-pom.xml?rev=607618&view=auto ============================================================================== --- directory/sandbox/felixk/studio-plugin/src/test/resources/unit/basic-clean-test/plugin-exception-pom.xml (added) +++ directory/sandbox/felixk/studio-plugin/src/test/resources/unit/basic-clean-test/plugin-exception-pom.xml Sun Dec 30 15:42:43 2007 @@ -0,0 +1,35 @@ + + + + + + + + + org.apache.directory.studio + maven-studio-plugin + + lib + false + + + + + Propchange: directory/sandbox/felixk/studio-plugin/src/test/resources/unit/basic-clean-test/plugin-exception-pom.xml ------------------------------------------------------------------------------ svn:eol-style = native