geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r153697 - in geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment: EARConfigBuilderTest.java MockConnectorConfigBuilder.java MockEJBConfigBuilder.java
Date Mon, 14 Feb 2005 02:38:55 GMT
Author: djencks
Date: Sun Feb 13 18:38:54 2005
New Revision: 153697

URL: http://svn.apache.org/viewcvs?view=rev&rev=153697
Log:
Avoid some assertion errors -- why weren't these showing up before?

Modified:
    geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
    geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockConnectorConfigBuilder.java
    geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java

Modified: geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java?view=diff&r1=153696&r2=153697
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
(original)
+++ geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
Sun Feb 13 18:38:54 2005
@@ -24,9 +24,11 @@
 import java.net.URI;
 import java.net.URL;
 import java.util.List;
+import java.util.Map;
 import java.util.jar.JarFile;
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
+import javax.xml.namespace.QName;
 
 import junit.extensions.TestSetup;
 import junit.framework.Test;
@@ -34,6 +36,7 @@
 import junit.framework.TestSuite;
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.util.DeploymentUtil;
+import org.apache.geronimo.deployment.DeploymentContext;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
@@ -56,9 +59,15 @@
     private static MockEJBConfigBuilder ejbConfigBuilder = new MockEJBConfigBuilder();
     private static MockWARConfigBuilder webConfigBuilder = new MockWARConfigBuilder();
     private static MockConnectorConfigBuilder connectorConfigBuilder = new MockConnectorConfigBuilder();
-    private static ResourceReferenceBuilder resourceReferenceBuilder = null;
+    private static ResourceReferenceBuilder resourceReferenceBuilder = connectorConfigBuilder;
     private static ModuleBuilder appClientConfigBuilder = null;
-    private static ServiceReferenceBuilder serviceReferenceBuilder = null;
+    private static ServiceReferenceBuilder serviceReferenceBuilder = new ServiceReferenceBuilder()
{
+
+        //it could return a Service or a Reference, we don't care
+        public Object createService(Class serviceInterface, URI wsdlURI, URI jaxrpcMappingURI,
QName serviceQName, Map portComponentRefMap, List handlerInfos, DeploymentContext deploymentContext,
Module module, ClassLoader classLoader) throws DeploymentException {
+            return null;
+        }
+    };
 
     private static final String j2eeServerName = "someDomain";
     private static final ObjectName transactionManagerObjectName = JMXUtil.getObjectName(j2eeServerName
+ ":type=TransactionManager");
@@ -230,7 +239,7 @@
         kernel.loadGBean(store, this.getClass().getClassLoader());
         kernel.startGBean(store.getName());
 
-        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName,
connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, ejbConfigBuilder, null, webConfigBuilder, connectorConfigBuilder, resourceReferenceBuilder,
appClientConfigBuilder, serviceReferenceBuilder, kernel);
+        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName,
connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, ejbConfigBuilder, ejbConfigBuilder, webConfigBuilder, connectorConfigBuilder, resourceReferenceBuilder,
appClientConfigBuilder, serviceReferenceBuilder, kernel);
 
 
         File tempDir = null;

Modified: geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockConnectorConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockConnectorConfigBuilder.java?view=diff&r1=153696&r2=153697
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockConnectorConfigBuilder.java
(original)
+++ geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockConnectorConfigBuilder.java
Sun Feb 13 18:38:54 2005
@@ -21,13 +21,17 @@
 import java.net.URI;
 import java.util.jar.JarFile;
 
+import javax.naming.Reference;
+import javax.management.ObjectName;
+
 import junit.framework.Assert;
 import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.gbean.GBeanData;
 
 /**
  * @version $Rev$ $Date$
  */
-public class MockConnectorConfigBuilder extends Assert implements ModuleBuilder {
+public class MockConnectorConfigBuilder extends Assert implements ModuleBuilder, ResourceReferenceBuilder{
     public EARContext earContext;
     public Module connectorModule;
     public ClassLoader cl;
@@ -67,4 +71,31 @@
         return null;
     }
 
+    public Reference createResourceRef(String containerId, Class iface) throws DeploymentException
{
+        return null;
+    }
+
+    public Reference createAdminObjectRef(String containerId, Class iface) throws DeploymentException
{
+        return null;
+    }
+
+    public ObjectName locateResourceName(ObjectName query) throws DeploymentException {
+        return null;
+    }
+
+    public GBeanData locateActivationSpecInfo(ObjectName resourceAdapterName, String messageListenerInterface)
throws DeploymentException {
+        return null;
+    }
+
+    public GBeanData locateResourceAdapterGBeanData(ObjectName resourceAdapterModuleName)
throws DeploymentException {
+        return null;
+    }
+
+    public GBeanData locateAdminObjectInfo(ObjectName resourceAdapterModuleName, String adminObjectInterfaceName)
throws DeploymentException {
+        return null;
+    }
+
+    public GBeanData locateConnectionFactoryInfo(ObjectName resourceAdapterModuleName, String
connectionFactoryInterfaceName) throws DeploymentException {
+        return null;
+    }
 }

Modified: geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java?view=diff&r1=153696&r2=153697
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java
(original)
+++ geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java
Sun Feb 13 18:38:54 2005
@@ -21,13 +21,15 @@
 import java.net.URI;
 import java.util.jar.JarFile;
 
+import javax.naming.Reference;
+
 import junit.framework.Assert;
 import org.apache.geronimo.common.DeploymentException;
 
 /**
  * @version $Rev$ $Date$
  */
-public class MockEJBConfigBuilder extends Assert implements ModuleBuilder {
+public class MockEJBConfigBuilder extends Assert implements ModuleBuilder, EJBReferenceBuilder
{
     public EARContext earContext;
     public EJBModule ejbModule;
     public ClassLoader cl;
@@ -67,4 +69,11 @@
         return null;
     }
 
+    public Reference createEJBLocalReference(String objectName, boolean isSession, String
localHome, String local) throws DeploymentException {
+        return null;
+    }
+
+    public Reference createEJBRemoteReference(String objectName, boolean isSession, String
home, String remote) throws DeploymentException {
+        return null;
+    }
 }



Mime
View raw message