You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/06/10 01:06:41 UTC

svn commit: r189850 - in /incubator/beehive/trunk/wsm/drt: build.xml tests/org/apache/beehive/wsm/axis/security/MemoryUserListTest.java tests/org/apache/beehive/wsm/jsr181/wsdl/XmlBeanWSDLProcessorTest.java

Author: ekoneil
Date: Thu Jun  9 16:06:40 2005
New Revision: 189850

URL: http://svn.apache.org/viewcvs?rev=189850&view=rev
Log:
More WSM DRT work.

- remove dependence on a "beehive.home" system property used to create fully-qualified paths to files in the tree.  These are now loaded / availabel via classloader.

BB: self
DRT: WSM pass


Modified:
    incubator/beehive/trunk/wsm/drt/build.xml
    incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/security/MemoryUserListTest.java
    incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/wsdl/XmlBeanWSDLProcessorTest.java

Modified: incubator/beehive/trunk/wsm/drt/build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/build.xml?rev=189850&r1=189849&r2=189850&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/drt/build.xml (original)
+++ incubator/beehive/trunk/wsm/drt/build.xml Thu Jun  9 16:06:40 2005
@@ -92,10 +92,10 @@
             debug="on"
             optimize="on"
             verbose="false"
-            failonerror="true"
-            />
+            failonerror="true"/>
         <copy todir="${build.tests}">
             <fileset dir="${drt.src}" includes="**/*.xml"/>
+            <fileset dir="${drt.src}" includes="**/*.wsdl"/>
         </copy>
     </target>
 
@@ -149,7 +149,6 @@
     <target name="run.drt">
         <echo message="** junit logfiles written to ${drt.logs} **"/>
         <junit failureproperty="wsmdrtfailed" printsummary="on" tempdir="${build.dir}" fork="yes">
-            <sysproperty key="beehive.home" value="${beehive.home}"/>
             <classpath>
                 <pathelement location="${build.tests}"/>
                 <pathelement location="${build.gen-tests}"/>

Modified: incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/security/MemoryUserListTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/security/MemoryUserListTest.java?rev=189850&r1=189849&r2=189850&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/security/MemoryUserListTest.java (original)
+++ incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/security/MemoryUserListTest.java Thu Jun  9 16:06:40 2005
@@ -21,6 +21,7 @@
 import java.util.Collection;
 import java.util.Iterator;
 import java.io.File;
+import java.io.InputStream;
 
 import junit.framework.TestCase;
 
@@ -39,17 +40,24 @@
 
 public class MemoryUserListTest extends TestCase {
 
-    private static final String BEEHIVE_HOME = System.getProperty("beehive.home");
-
-    BeehiveRoleDocument brd = null;
-    UserList userList = null;
+    private BeehiveRoleDocument brd = null;
+    private UserList userList = null;
     
     public void setUp() throws Exception {
-        File f = new File(BEEHIVE_HOME,
-                          "wsm/drt/tests/beehive-role.xml");
 
-        brd = BeehiveRoleDocument.Factory.parse( f ); 
-        userList = createUserList ( brd );
+        InputStream is = null;
+        try {
+            is = Thread.currentThread().getContextClassLoader().getResourceAsStream("beehive-role.xml");
+            brd = BeehiveRoleDocument.Factory.parse(is);
+        }
+        finally {
+            if(is != null)
+                is.close();
+        }
+
+        assert brd != null : "Received a null BeehiveRoleDocument";
+
+        userList = createUserList (brd);
     }
 
     public void testRoles() throws Exception {

Modified: incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/wsdl/XmlBeanWSDLProcessorTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/wsdl/XmlBeanWSDLProcessorTest.java?rev=189850&r1=189849&r2=189850&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/wsdl/XmlBeanWSDLProcessorTest.java (original)
+++ incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/wsdl/XmlBeanWSDLProcessorTest.java Thu Jun  9 16:06:40 2005
@@ -42,21 +42,19 @@
 public class XmlBeanWSDLProcessorTest
     extends TestCase {
 
-    private static final String BEEHIVE_HOME = System.getProperty("beehive.home");
     private static final String CLASSNAME = "org.apache.beehive.wsm.jsr181.wsdl.StarWars";
 
     private BeehiveWsTypeMetadata serverModel;
     private BeehiveWsTypeMetadata clientModel;
 
     public void setUp() throws Exception {
-        File f = new File(BEEHIVE_HOME, "wsm/drt/tests/schemas/starwars.wsdl");
-        
+
         Class clazz = Class.forName(CLASSNAME);
         serverModel = Jsr181ObjectModelStore.load(clazz);
 
         InputStream is = null;
         try {
-            is = new FileInputStream(f);
+            is = Thread.currentThread().getContextClassLoader().getResourceAsStream("schemas/starwars.wsdl");
             XmlBeanWSDLProcessor xbwp = new XmlBeanWSDLProcessor(is);
             clientModel = xbwp.getObjectModel(new SystemTypeLookupService());
         }