[jboss-cvs] JBossAS SVN: r58379 - in trunk/testsuite/src: main/org/jboss/test/web/mock main/org/jboss/test/web/servlets main/org/jboss/test/web/test resources/web/simple-xmlonly

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Nov 15 01:27:55 EST 2006


Author: scott.stark at jboss.org
Date: 2006-11-15 01:27:50 -0500 (Wed, 15 Nov 2006)
New Revision: 58379

Added:
   trunk/testsuite/src/main/org/jboss/test/web/test/EncXmlUnitTestCase.java
Modified:
   trunk/testsuite/src/main/org/jboss/test/web/mock/MockDataSource.java
   trunk/testsuite/src/main/org/jboss/test/web/servlets/StandaloneENCServlet.java
   trunk/testsuite/src/resources/web/simple-xmlonly/encbinding-beans.xml
Log:
Update the serialization and types used

Modified: trunk/testsuite/src/main/org/jboss/test/web/mock/MockDataSource.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/web/mock/MockDataSource.java	2006-11-15 06:13:11 UTC (rev 58378)
+++ trunk/testsuite/src/main/org/jboss/test/web/mock/MockDataSource.java	2006-11-15 06:27:50 UTC (rev 58379)
@@ -1,6 +1,7 @@
 package org.jboss.test.web.mock;
 
 import java.io.PrintWriter;
+import java.io.Serializable;
 import java.sql.Connection;
 import java.sql.SQLException;
 
@@ -12,9 +13,15 @@
  * @author Scott.Stark at jboss.org
  * @version $Revision:$
  */
-public class MockDataSource implements DataSource
+public class MockDataSource implements DataSource, Serializable
 {
+   private static final long serialVersionUID = 1;
 
+   public MockDataSource()
+   {
+     System.err.println("MockDataSource");
+   }
+
    public Connection getConnection() throws SQLException
    {
       return null;

Modified: trunk/testsuite/src/main/org/jboss/test/web/servlets/StandaloneENCServlet.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/web/servlets/StandaloneENCServlet.java	2006-11-15 06:13:11 UTC (rev 58378)
+++ trunk/testsuite/src/main/org/jboss/test/web/servlets/StandaloneENCServlet.java	2006-11-15 06:27:50 UTC (rev 58379)
@@ -43,8 +43,8 @@
 import javax.sql.DataSource;
 
 import org.jboss.test.web.mock.EntityHome;
-import org.jboss.test.web.interfaces.StatelessSessionHome;
-import org.jboss.test.web.interfaces.StatelessSessionLocalHome;
+import org.jboss.test.web.mock.StatelessSessionHome;
+import org.jboss.test.web.mock.StatelessSessionLocalHome;
 
 /** Tests of the server ENC naming context. This servlet has no dependencies on other componet
  * deployments as the env references are to mock objects.

Added: trunk/testsuite/src/main/org/jboss/test/web/test/EncXmlUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/web/test/EncXmlUnitTestCase.java	2006-11-15 06:13:11 UTC (rev 58378)
+++ trunk/testsuite/src/main/org/jboss/test/web/test/EncXmlUnitTestCase.java	2006-11-15 06:27:50 UTC (rev 58379)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.web.test;
+
+import java.net.URL;
+
+import junit.framework.Test;
+
+import org.apache.commons.httpclient.Header;
+import org.apache.commons.httpclient.HttpMethodBase;
+import org.jboss.test.JBossTestCase;
+import org.jboss.test.util.web.HttpUtils;
+
+/** Tests of a web app java:comp/env jndi settings specified via the
+ * web.xml/jboss-web.xml descriptors.
+ 
+ @author Scott.Stark at jboss.org
+ @version $Revision$
+ */
+public class EncXmlUnitTestCase extends JBossTestCase
+{
+   private String baseURL = HttpUtils.getBaseURL(); 
+   
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(EncXmlUnitTestCase.class, "simple-xmlonly.beans,simple-xmlonly.war");
+   }
+
+   public EncXmlUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   /** Access the http://{host}/simple-xmlonly/ENCServlet
+    */
+   public void testAltRequestInfoServlet()
+      throws Exception
+   {
+      URL url = new URL(baseURL+"simple-xmlonly/ENCServlet");
+      HttpMethodBase request = HttpUtils.accessURL(url);
+      Header errors = request.getResponseHeader("X-Exception");
+      log.info("X-Exception: "+errors);
+      assertTrue("X-Exception("+errors+") is null", errors == null);      
+   }
+
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/web/test/EncXmlUnitTestCase.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: trunk/testsuite/src/resources/web/simple-xmlonly/encbinding-beans.xml
===================================================================
--- trunk/testsuite/src/resources/web/simple-xmlonly/encbinding-beans.xml	2006-11-15 06:13:11 UTC (rev 58378)
+++ trunk/testsuite/src/resources/web/simple-xmlonly/encbinding-beans.xml	2006-11-15 06:27:50 UTC (rev 58379)
@@ -10,19 +10,16 @@
         name="DependencyAdvice"
         class="org.jboss.aop.microcontainer.aspects.jndi.JndiIntroduction"
         classes="@org.jboss.aop.microcontainer.aspects.jndi.JndiBinding"
+        manager-bean="AspectManager"
+        manager-property="aspectManager"
         pointcut="execution(* @org.jboss.aop.microcontainer.aspects.jndi.JndiBinding->$implements{org.jboss.kernel.spi.dependency.KernelControllerContextAware}(..))">
-        <property name="env">
-            <map class="java.util.Properties" keyClass="java.lang.String" valueClass="java.lang.String">
-                <entry><key>java.naming.factory.initial</key><value>org.jboss.test.microcontainer.support.jndi.MockInitialContextFactory</value></entry>
-            </map>
-        </property>
     </aop:lifecycle>
 
     <!-- The jndi bindings -->
     <bean name="ENC.MockDS" class="org.jboss.test.web.mock.MockDataSource">
         <annotation>@org.jboss.aop.microcontainer.aspects.jndi.JndiBinding(name="java:/MockDS")</annotation>
     </bean>
-    <bean name="ENC/ejb/bean3" class="org.jboss.test.web.mock.SessionHomeBean">
+    <bean name="ENC/ejb/bean3" class="org.jboss.test.web.mock.StatelessHomeBean">
         <annotation>@org.jboss.aop.microcontainer.aspects.jndi.JndiBinding(name="jbosstest/ejbs/UnsecuredEJB")</annotation>
     </bean>
     <bean name="ENC/ejb/local/bean3" class="org.jboss.test.web.mock.StatelessLocalHomeBean">




More information about the jboss-cvs-commits mailing list