directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
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 GMT
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!--
+  @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.directory.studio</groupId>
+        <artifactId>maven-studio-plugin</artifactId>
+        <configuration>
+          <libraryPath>lib</libraryPath>
+          <skip>false</skip>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: directory/sandbox/felixk/studio-plugin/src/test/resources/unit/basic-clean-test/plugin-exception-pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message