incubator-easyant-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlboud...@apache.org
Subject svn commit: r1369454 - in /incubator/easyant/plugins/trunk/resources-std/src: main/resources/ test/ test/antunit/ test/antunit/src/ test/antunit/src/integration-test/ test/antunit/src/integration-test/resources/ test/antunit/src/main/ test/antunit/src/...
Date Sat, 04 Aug 2012 21:19:19 GMT
Author: jlboudart
Date: Sat Aug  4 21:19:18 2012
New Revision: 1369454

URL: http://svn.apache.org/viewvc?rev=1369454&view=rev
Log:
Add resources-std test case

Added:
    incubator/easyant/plugins/trunk/resources-std/src/test/
    incubator/easyant/plugins/trunk/resources-std/src/test/antunit/
    incubator/easyant/plugins/trunk/resources-std/src/test/antunit/resources-std-test.xml
    incubator/easyant/plugins/trunk/resources-std/src/test/antunit/src/
    incubator/easyant/plugins/trunk/resources-std/src/test/antunit/src/integration-test/
    incubator/easyant/plugins/trunk/resources-std/src/test/antunit/src/integration-test/resources/
    incubator/easyant/plugins/trunk/resources-std/src/test/antunit/src/integration-test/resources/foobar.test.integration.properties
    incubator/easyant/plugins/trunk/resources-std/src/test/antunit/src/main/
    incubator/easyant/plugins/trunk/resources-std/src/test/antunit/src/main/resources/
    incubator/easyant/plugins/trunk/resources-std/src/test/antunit/src/main/resources/foobar.main.properties
    incubator/easyant/plugins/trunk/resources-std/src/test/antunit/src/test/
    incubator/easyant/plugins/trunk/resources-std/src/test/antunit/src/test/resources/
    incubator/easyant/plugins/trunk/resources-std/src/test/antunit/src/test/resources/foobar.test.properties
Modified:
    incubator/easyant/plugins/trunk/resources-std/src/main/resources/resources-std.ant

Modified: incubator/easyant/plugins/trunk/resources-std/src/main/resources/resources-std.ant
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/resources-std/src/main/resources/resources-std.ant?rev=1369454&r1=1369453&r2=1369454&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/resources-std/src/main/resources/resources-std.ant (original)
+++ incubator/easyant/plugins/trunk/resources-std/src/main/resources/resources-std.ant Sat
Aug  4 21:19:18 2012
@@ -32,7 +32,7 @@
         <ea:parameter property="target.test.classes" required="true" 
                 description="destination directory where test resources should be put" />
     
-        <ea:parameter property="target.test.integration.classes" default="${basedir}/target/integration-test/classes"
+        <ea:parameter property="target.test.integration.classes" default="${target}/integration-test/classes"
                 description="destination directory where integration test resources should
be put" />
 
 
@@ -58,7 +58,7 @@
         <filterset id="src.test.integration.resources.filter"/>
     </target>
 
-    <target name="-resources-std:check-resources">
+    <target name="-resources-std:check-resources" depends="resources-std:init">
         <available file="${src.main.resources}" property="has.src.main.resources" />
         <available file="${src.test.resources}" property="has.src.test.resources" />
         <available file="${src.test.integration.resources}" property="has.src.test.integration.resources"
/>

Added: incubator/easyant/plugins/trunk/resources-std/src/test/antunit/resources-std-test.xml
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/resources-std/src/test/antunit/resources-std-test.xml?rev=1369454&view=auto
==============================================================================
--- incubator/easyant/plugins/trunk/resources-std/src/test/antunit/resources-std-test.xml
(added)
+++ incubator/easyant/plugins/trunk/resources-std/src/test/antunit/resources-std-test.xml
Sat Aug  4 21:19:18 2012
@@ -0,0 +1,83 @@
+<!--
+   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.
+-->
+<project name="org.apache.easyant.plugins;resources-std-test" 
+    xmlns:au="antlib:org.apache.ant.antunit" 
+    xmlns:ivy="antlib:org.apache.ivy.ant"
+    xmlns:ea="antlib:org.apache.easyant">
+    
+    <!-- Import your plugin --> 
+    <property name="target" value="target/test-antunit"/>
+    <!-- configure easyant in current project -->
+    <ea:configure-easyant-ivy-instance />
+    <!-- import our local plugin -->
+    <ea:import-test-module moduleIvy="../../../module.ivy" sourceDirectory="../../main/resources"/>
+   
+    <!-- Defines a setUp / tearDown (before each test) that cleans the environnement -->

+    <target name="clean" description="remove stale build artifacts before / after each
test">
+        <delete dir="${basedir}" includeemptydirs="true">
+            <include name="**/target/**"/>
+            <include name="**/lib/**"/>
+        </delete>
+    </target>
+    
+    <target name="setUp" depends="clean">
+        <property name="target.main.classes" value="${target}/classes"/>
+        <property name="target.test.classes" value="${target}/test-classes"/>
+<!--
+        <property name="target.test.integration.classes" value="${target}/test-classes"/>
+-->
+
+    </target>
+    <target name="tearDown" depends="clean"/>
+    
+    <target name="test-resources-std:init" depends="resources-std:init">
+        <au:assertPropertyEquals name="src.main.resources" value="${basedir}/src/main/resources"/>
+        <au:assertPropertyEquals name="src.test.resources" value="${basedir}/src/test/resources"/>
+        <au:assertPropertyEquals name="src.test.integration.resources" value="${basedir}/src/integration-test/resources"/>
+        <au:assertPropertyEquals name="resources.std.includes.pattern" value="**/*"/>
+        <au:assertPropertyEquals name="resources.std.excludes.pattern" value=""/>
+        <au:assertPropertyEquals name="resources.std.include.emptydir" value="true"/>
+        <au:assertPropertyEquals name="resources.std.test.includes.pattern" value="**/*"/>
+        <au:assertPropertyEquals name="resources.std.test.excludes.pattern" value=""/>
+        <au:assertPropertyEquals name="resources.std.test.integration.includes.pattern"
value="**/*"/>
+        <au:assertPropertyEquals name="resources.std.test.integration.excludes.pattern"
value=""/>
+ 
+        <au:assertReferenceSet refid="src.main.resources.filter"/>
+        <au:assertReferenceSet refid="src.test.resources.filter"/>
+        <au:assertReferenceSet refid="src.test.integration.resources.filter"/>
+    </target>
+
+    <target name="test-resources-std:check-resources" depends="-resources-std:check-resources">
+        <au:assertPropertyEquals name="has.src.main.resources" value="true"/>
+        <au:assertPropertyEquals name="has.src.test.resources" value="true"/>
+        <au:assertPropertyEquals name="has.src.test.integration.resources" value="true"/>
+    </target>
+
+    <target name="test-resources-std:copy-resources" depends="resources-std:copy-resources"
>
+        <au:assertFileExists file="${target.main.classes}"/>
+    </target>
+
+    <target name="test-resources-std:copy-test-resources" depends="resources-std:copy-test-resources"
>
+        <au:assertFileExists file="${target.test.classes}"/>
+    </target>
+
+    <target name="test-resources-std:copy-test-integration-resources" depends="resources-std:copy-test-integration-resources"
>
+        <au:assertFileExists file="${target.test.integration.classes}"/>
+    </target>
+
+
+</project>

Added: incubator/easyant/plugins/trunk/resources-std/src/test/antunit/src/integration-test/resources/foobar.test.integration.properties
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/resources-std/src/test/antunit/src/integration-test/resources/foobar.test.integration.properties?rev=1369454&view=auto
==============================================================================
--- incubator/easyant/plugins/trunk/resources-std/src/test/antunit/src/integration-test/resources/foobar.test.integration.properties
(added)
+++ incubator/easyant/plugins/trunk/resources-std/src/test/antunit/src/integration-test/resources/foobar.test.integration.properties
Sat Aug  4 21:19:18 2012
@@ -0,0 +1 @@
+

Added: incubator/easyant/plugins/trunk/resources-std/src/test/antunit/src/main/resources/foobar.main.properties
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/resources-std/src/test/antunit/src/main/resources/foobar.main.properties?rev=1369454&view=auto
==============================================================================
--- incubator/easyant/plugins/trunk/resources-std/src/test/antunit/src/main/resources/foobar.main.properties
(added)
+++ incubator/easyant/plugins/trunk/resources-std/src/test/antunit/src/main/resources/foobar.main.properties
Sat Aug  4 21:19:18 2012
@@ -0,0 +1 @@
+

Added: incubator/easyant/plugins/trunk/resources-std/src/test/antunit/src/test/resources/foobar.test.properties
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/resources-std/src/test/antunit/src/test/resources/foobar.test.properties?rev=1369454&view=auto
==============================================================================
--- incubator/easyant/plugins/trunk/resources-std/src/test/antunit/src/test/resources/foobar.test.properties
(added)
+++ incubator/easyant/plugins/trunk/resources-std/src/test/antunit/src/test/resources/foobar.test.properties
Sat Aug  4 21:19:18 2012
@@ -0,0 +1 @@
+



Mime
View raw message