You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/04/08 09:27:13 UTC

svn commit: r763128 - in /commons/sandbox/runtime/trunk: build.xml src/test/org/apache/commons/runtime/TestAll.java src/test/org/apache/commons/runtime/TestProperties.java

Author: mturk
Date: Wed Apr  8 07:27:12 2009
New Revision: 763128

URL: http://svn.apache.org/viewvc?rev=763128&view=rev
Log:
Add stub for test suite

Added:
    commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestAll.java   (with props)
    commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestProperties.java   (with props)
Modified:
    commons/sandbox/runtime/trunk/build.xml

Modified: commons/sandbox/runtime/trunk/build.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/build.xml?rev=763128&r1=763127&r2=763128&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/build.xml (original)
+++ commons/sandbox/runtime/trunk/build.xml Wed Apr  8 07:27:12 2009
@@ -18,7 +18,7 @@
     <property name="build.dir" value="./dist"/>
     <property name="build.src" value="${build.dir}/src"/>
     <property name="build.dest" value="${build.dir}/bin"/>
-    <property name="src.dir" value="./src/main"/>
+    <property name="src.dir" value="./src"/>
     <property name="final.name" value="${project}-${version}"/>
     <property name="dist.root" value="./dist"/>
     <property name="ant.home" value="."/>
@@ -93,7 +93,7 @@
             destdir="${docs.dest}/api"
             author="true"
             version="true"
-            overview="${src.dir}/java/overview.html"
+            overview="${src.dir}/main/java/overview.html"
             packagenames="org.apache.commons.runtime.*"
             windowtitle="${title} (Version ${version})"
             doctitle="&lt;h2&gt;${title}&lt;/h2&gt;"
@@ -130,7 +130,7 @@
         <filter token="VERSION_NUMBER" value="${version.number}"/>
         <filter token="VERSION_BUILT" value="${TODAY} ${TSTAMP}"/>
         <copy todir="${build.src}/java" filtering="yes">
-            <fileset dir="${src.dir}/java">
+            <fileset dir="${src.dir}/main/java">
                 <include name="**/*.java"/>
                 <include name="**/*.xml"/>
                 <include name="**/*.properties"/>
@@ -265,7 +265,7 @@
     <!-- Junit tests                                                         -->
     <!-- =================================================================== -->
     <target name="test" depends="tests">
-        <echo message="Running Runtime package tests ..."/>
+        <echo message="Running Commons Runtime package tests ..."/>
         <java dir="${test.dir}" classname="${test.entry}" fork="yes"
               failonerror="${test.failonerror}">
             <classpath refid="test.classpath"/>
@@ -276,7 +276,7 @@
     <!-- Run Example                                                         -->
     <!-- =================================================================== -->
     <target name="run" depends="examples">
-        <echo message="Running Runtime package example ${example} ..."/>
+        <echo message="Running Commons Runtime package example ${example} ..."/>
         <java dir="${examples.dir}"
               classname="org.apache.commons.runtime.${example}"
               fork="yes"

Added: commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestAll.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestAll.java?rev=763128&view=auto
==============================================================================
--- commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestAll.java (added)
+++ commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestAll.java Wed Apr  8 07:27:12 2009
@@ -0,0 +1,44 @@
+/* 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.
+ */
+
+package org.apache.commons.runtime;
+import junit.framework.*;
+
+/**
+ */
+public class TestAll extends TestCase
+{
+
+    public TestAll(String testName)
+    {
+        super(testName);
+    }
+
+    public static Test suite()
+    {
+        TestSuite suite = new TestSuite();
+        // Fundamentals
+        suite.addTest(TestProperties.suite());
+        return suite;
+    }
+
+    public static void main(String args[])
+    {
+        String[] testCaseName = { TestAll.class.getName() };
+        junit.textui.TestRunner.main(testCaseName);
+    }
+
+}

Propchange: commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestAll.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestProperties.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestProperties.java?rev=763128&view=auto
==============================================================================
--- commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestProperties.java (added)
+++ commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestProperties.java Wed Apr  8 07:27:12 2009
@@ -0,0 +1,46 @@
+/* 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.
+ */
+
+package org.apache.commons.runtime;
+
+import java.lang.System;
+import java.util.Properties;
+import junit.framework.*;
+
+/**
+ * Properties Test.
+ *
+ */
+public class TestProperties extends TestCase
+{
+
+    public static Test suite() {
+        TestSuite suite = new TestSuite(TestProperties.class);
+        return suite;
+    }
+
+    public void testSystemProperties()
+        throws Exception
+    {
+        String property;
+        Properties p = System.getProperties();
+        property = p.getProperty("os.name");
+        assertNotNull("os.name ", p);
+        property = p.getProperty("os.arch");
+        assertNotNull("os.arch ", p);
+    }
+
+}

Propchange: commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestProperties.java
------------------------------------------------------------------------------
    svn:eol-style = native