river-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtra...@apache.org
Subject svn commit: r1034883 - in /incubator/river/jtsk/skunk/surrogate: ./ nbproject/private/ test/org/apache/river/container/hsm/ test/org/apache/river/surrogate/ test/org/apache/river/surrogate/sample/ testfiles/
Date Sat, 13 Nov 2010 21:24:04 GMT
Author: gtrasuk
Date: Sat Nov 13 21:24:03 2010
New Revision: 1034883

URL: http://svn.apache.org/viewvc?rev=1034883&view=rev
Log:
Daily commit.

Added:
    incubator/river/jtsk/skunk/surrogate/test/org/apache/river/container/hsm/SimpleMachineTest.java
      - copied, changed from r1033506, incubator/river/jtsk/skunk/surrogate/test/org/apache/river/container/hsm/TestSimpleMachine.java
    incubator/river/jtsk/skunk/surrogate/test/org/apache/river/surrogate/sample/
    incubator/river/jtsk/skunk/surrogate/test/org/apache/river/surrogate/sample/SampleSurrogate.java
    incubator/river/jtsk/skunk/surrogate/testfiles/
    incubator/river/jtsk/skunk/surrogate/testfiles/SampleSurrogate.MF
Removed:
    incubator/river/jtsk/skunk/surrogate/test/org/apache/river/container/hsm/TestSimpleMachine.java
Modified:
    incubator/river/jtsk/skunk/surrogate/   (props changed)
    incubator/river/jtsk/skunk/surrogate/build.xml
    incubator/river/jtsk/skunk/surrogate/nbproject/private/private.properties
    incubator/river/jtsk/skunk/surrogate/test/org/apache/river/surrogate/SurrogateContextTest.java

Propchange: incubator/river/jtsk/skunk/surrogate/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sat Nov 13 21:24:03 2010
@@ -1 +1,2 @@
 build
+dist

Modified: incubator/river/jtsk/skunk/surrogate/build.xml
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/surrogate/build.xml?rev=1034883&r1=1034882&r2=1034883&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/surrogate/build.xml (original)
+++ incubator/river/jtsk/skunk/surrogate/build.xml Sat Nov 13 21:24:03 2010
@@ -71,4 +71,26 @@
     nbproject/build-impl.xml file. 
 
     -->
+
+    <!--
+    Build the whatever sample artifacts are needed for unit testing.  In
+    particular, we need a sample surrogate.
+    -->
+    <target name='-post-compile-test'>
+        <mkdir dir="${basedir}/build/test/files"/>
+        <property name="build.test.sample-surrogate.dir"
+            value="${basedir}/build/test/sample-surrogate"/>
+
+        <mkdir dir="${build.test.sample-surrogate.dir}"/>
+        <!-- Create and copy the classes. -->
+        <copy todir="${build.test.sample-surrogate.dir}">
+            <fileset dir="${basedir}/build/test/classes"
+                includes="org/apache/river/surrogate/sample/**"/>
+        </copy>
+        <mkdir dir="${build.test.sample-surrogate.dir}/META-INF"/>
+        <copy tofile="${build.test.sample-surrogate.dir}/META-INF/MANIFEST.MF"
+            file="${basedir}/testfiles/SampleSurrogate.MF"/>
+        <jar basedir="${build.test.sample-surrogate.dir}"
+        jarfile="${basedir}/build/test/files/sample-surrogate.jar"/>
+    </target>
 </project>

Modified: incubator/river/jtsk/skunk/surrogate/nbproject/private/private.properties
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/surrogate/nbproject/private/private.properties?rev=1034883&r1=1034882&r2=1034883&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/surrogate/nbproject/private/private.properties (original)
+++ incubator/river/jtsk/skunk/surrogate/nbproject/private/private.properties Sat Nov 13 21:24:03
2010
@@ -1,6 +1,6 @@
-compile.on.save=true
-do.depend=false
-do.jar=true
-javac.debug=true
-javadoc.preview=true
-user.properties.file=C:\\Documents and Settings\\trasukg\\.netbeans\\6.9\\build.properties
+compile.on.save=true
+do.depend=false
+do.jar=true
+javac.debug=true
+javadoc.preview=true
+user.properties.file=/home/trasukg/.netbeans/6.9/build.properties

Copied: incubator/river/jtsk/skunk/surrogate/test/org/apache/river/container/hsm/SimpleMachineTest.java
(from r1033506, incubator/river/jtsk/skunk/surrogate/test/org/apache/river/container/hsm/TestSimpleMachine.java)
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/surrogate/test/org/apache/river/container/hsm/SimpleMachineTest.java?p2=incubator/river/jtsk/skunk/surrogate/test/org/apache/river/container/hsm/SimpleMachineTest.java&p1=incubator/river/jtsk/skunk/surrogate/test/org/apache/river/container/hsm/TestSimpleMachine.java&r1=1033506&r2=1034883&rev=1034883&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/surrogate/test/org/apache/river/container/hsm/TestSimpleMachine.java
(original)
+++ incubator/river/jtsk/skunk/surrogate/test/org/apache/river/container/hsm/SimpleMachineTest.java
Sat Nov 13 21:24:03 2010
@@ -36,9 +36,9 @@ import static org.junit.Assert.assertTru
  *
  * @author trasukg
  */
-public class TestSimpleMachine {
+public class SimpleMachineTest {
 
-    public TestSimpleMachine() throws InstantiationException, IllegalAccessException,
+    public SimpleMachineTest() throws InstantiationException, IllegalAccessException,
     NoSuchMethodException, InvocationTargetException {
     }
 

Modified: incubator/river/jtsk/skunk/surrogate/test/org/apache/river/surrogate/SurrogateContextTest.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/surrogate/test/org/apache/river/surrogate/SurrogateContextTest.java?rev=1034883&r1=1034882&r2=1034883&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/surrogate/test/org/apache/river/surrogate/SurrogateContextTest.java
(original)
+++ incubator/river/jtsk/skunk/surrogate/test/org/apache/river/surrogate/SurrogateContextTest.java
Sat Nov 13 21:24:03 2010
@@ -18,6 +18,7 @@
 
 package org.apache.river.surrogate;
 
+import java.io.File;
 import org.apache.river.container.ApplicationEnvironment;
 import org.junit.After;
 import org.junit.AfterClass;
@@ -61,8 +62,16 @@ public class SurrogateContextTest {
      */
     @Test
     public void testJarUnpack() {
-
+        fail("Implement me");
     }
 
-
+    @Test
+    /**
+     Make sure that the jar containing our test surrogate is actually there.
+     It should be built by the "-post-compile-test" target in 'build.xml'.
+     */
+    public void testThatTestJarIsPresent() {
+        File testJar=new File("build/test/files/sample-surrogate.jar");
+        assertTrue("No test jar present", testJar.exists());
+    }
 }
\ No newline at end of file

Added: incubator/river/jtsk/skunk/surrogate/test/org/apache/river/surrogate/sample/SampleSurrogate.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/surrogate/test/org/apache/river/surrogate/sample/SampleSurrogate.java?rev=1034883&view=auto
==============================================================================
--- incubator/river/jtsk/skunk/surrogate/test/org/apache/river/surrogate/sample/SampleSurrogate.java
(added)
+++ incubator/river/jtsk/skunk/surrogate/test/org/apache/river/surrogate/sample/SampleSurrogate.java
Sat Nov 13 21:24:03 2010
@@ -0,0 +1,25 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.apache.river.surrogate.sample;
+
+import net.jini.surrogate.HostContext;
+import net.jini.surrogate.Surrogate;
+
+/**
+ *
+ * @author trasukg
+ */
+public class SampleSurrogate implements Surrogate {
+
+    public void activate(HostContext hostContext, Object context) throws Exception {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    public void deactivate() {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+}

Added: incubator/river/jtsk/skunk/surrogate/testfiles/SampleSurrogate.MF
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/surrogate/testfiles/SampleSurrogate.MF?rev=1034883&view=auto
==============================================================================
--- incubator/river/jtsk/skunk/surrogate/testfiles/SampleSurrogate.MF (added)
+++ incubator/river/jtsk/skunk/surrogate/testfiles/SampleSurrogate.MF Sat Nov 13 21:24:03
2010
@@ -0,0 +1 @@
+Surrogate-Class: org.apache.river.surrogate.sample.SampleSurrogate



Mime
View raw message