geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r413780 - in /geronimo/branches/1.1/modules: j2ee-schema/src/java/org/apache/geronimo/schema/ j2ee-schema/src/test-data/geronimo/ j2ee-schema/src/test/org/apache/geronimo/schema/ web-builder/src/test-resources/plans/ web-builder/src/test/or...
Date Tue, 13 Jun 2006 01:20:35 GMT
Author: djencks
Date: Mon Jun 12 18:20:35 2006
New Revision: 413780

URL: http://svn.apache.org/viewvc?rev=413780&view=rev
Log:
GERONIMO-2108 Add message-destination to the tags we convert to naming schema

Added:
    geronimo/branches/1.1/modules/j2ee-schema/src/test-data/geronimo/web-md-post.xml
      - copied unchanged from r413779, geronimo/trunk/modules/j2ee-schema/src/test-data/geronimo/web-md-post.xml
    geronimo/branches/1.1/modules/j2ee-schema/src/test-data/geronimo/web-md-pre.xml
      - copied unchanged from r413779, geronimo/trunk/modules/j2ee-schema/src/test-data/geronimo/web-md-pre.xml
    geronimo/branches/1.1/modules/web-builder/src/test-resources/plans/web-md-post.xml
      - copied unchanged from r413779, geronimo/trunk/modules/web-builder/src/test-resources/plans/web-md-post.xml
    geronimo/branches/1.1/modules/web-builder/src/test-resources/plans/web-md-pre.xml
      - copied unchanged from r413779, geronimo/trunk/modules/web-builder/src/test-resources/plans/web-md-pre.xml
Modified:
    geronimo/branches/1.1/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java
    geronimo/branches/1.1/modules/j2ee-schema/src/test/org/apache/geronimo/schema/SchemaConversionUtilsTest.java
    geronimo/branches/1.1/modules/web-builder/src/test/org/apache/geronimo/web/deployment/GenericToSpecificPlanConverterTest.java

Modified: geronimo/branches/1.1/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java
URL: http://svn.apache.org/viewvc/geronimo/branches/1.1/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java?rev=413780&r1=413779&r2=413780&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java
(original)
+++ geronimo/branches/1.1/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java
Mon Jun 12 18:20:35 2006
@@ -59,6 +59,7 @@
         GERONIMO_SCHEMA_CONVERSIONS.put("service-ref", new NamespaceElementConverter(GERONIMO_NAMING_NAMESPACE));
         GERONIMO_SCHEMA_CONVERSIONS.put("resource-ref", new NamespaceElementConverter(GERONIMO_NAMING_NAMESPACE));
         GERONIMO_SCHEMA_CONVERSIONS.put("resource-env-ref", new NamespaceElementConverter(GERONIMO_NAMING_NAMESPACE));
+        GERONIMO_SCHEMA_CONVERSIONS.put("message-destination", new NamespaceElementConverter(GERONIMO_NAMING_NAMESPACE));
         GERONIMO_SCHEMA_CONVERSIONS.put("cmp-connection-factory", new NamespaceElementConverter(GERONIMO_NAMING_NAMESPACE));
         GERONIMO_SCHEMA_CONVERSIONS.put("workmanager", new NamespaceElementConverter(GERONIMO_NAMING_NAMESPACE));
         GERONIMO_SCHEMA_CONVERSIONS.put("resource-adapter", new NamespaceElementConverter(GERONIMO_NAMING_NAMESPACE));

Modified: geronimo/branches/1.1/modules/j2ee-schema/src/test/org/apache/geronimo/schema/SchemaConversionUtilsTest.java
URL: http://svn.apache.org/viewvc/geronimo/branches/1.1/modules/j2ee-schema/src/test/org/apache/geronimo/schema/SchemaConversionUtilsTest.java?rev=413780&r1=413779&r2=413780&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee-schema/src/test/org/apache/geronimo/schema/SchemaConversionUtilsTest.java
(original)
+++ geronimo/branches/1.1/modules/j2ee-schema/src/test/org/apache/geronimo/schema/SchemaConversionUtilsTest.java
Mon Jun 12 18:20:35 2006
@@ -516,6 +516,27 @@
         }
 
     }
+    public void testWebMessageDestination1() throws Exception {
+        URL srcXml = classLoader.getResource("geronimo/web-md-pre.xml");
+        URL expectedOutputXml = classLoader.getResource("geronimo/web-md-post.xml");
+        XmlObject xmlObject = XmlObject.Factory.parse(srcXml);
+        XmlCursor cursor = xmlObject.newCursor();
+        try {
+            SchemaConversionUtils.convertToGeronimoSubSchemas(cursor);
+                    System.out.println(xmlObject.toString());
+            XmlObject expected = XmlObject.Factory.parse(expectedOutputXml);
+            System.out.println(expected.toString());
+            List problems = new ArrayList();
+            boolean ok = compareXmlObjects(xmlObject, expected, problems);
+            assertTrue("Differences: " + problems, ok);
+            SchemaConversionUtils.convertToGeronimoSubSchemas(cursor);
+            boolean ok2 = compareXmlObjects(xmlObject, expected, problems);
+            assertTrue("Differences: " + problems, ok2);
+        } finally {
+            cursor.dispose();
+        }
+
+    }
 
     private boolean compareXmlObjects(XmlObject xmlObject, XmlObject expectedObject, List
problems) {
         XmlCursor test = xmlObject.newCursor();

Modified: geronimo/branches/1.1/modules/web-builder/src/test/org/apache/geronimo/web/deployment/GenericToSpecificPlanConverterTest.java
URL: http://svn.apache.org/viewvc/geronimo/branches/1.1/modules/web-builder/src/test/org/apache/geronimo/web/deployment/GenericToSpecificPlanConverterTest.java?rev=413780&r1=413779&r2=413780&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/web-builder/src/test/org/apache/geronimo/web/deployment/GenericToSpecificPlanConverterTest.java
(original)
+++ geronimo/branches/1.1/modules/web-builder/src/test/org/apache/geronimo/web/deployment/GenericToSpecificPlanConverterTest.java
Mon Jun 12 18:20:35 2006
@@ -34,18 +34,21 @@
     private ClassLoader classLoader = this.getClass().getClassLoader();
 
     public void testConvertPlan1() throws Exception {
-        testConvertPlan("plans/tomcat-pre.xml");
+        testConvertPlan("plans/tomcat-pre.xml", "plans/tomcat-post.xml");
     }
     public void testConvertPlan2() throws Exception {
-        testConvertPlan("plans/tomcat-pre2.xml");
+        testConvertPlan("plans/tomcat-pre2.xml", "plans/tomcat-post.xml");
     }
     public void testConvertPlan3() throws Exception {
-        testConvertPlan("plans/tomcat-pre3.xml");
+        testConvertPlan("plans/tomcat-pre3.xml", "plans/tomcat-post.xml");
+    }
+    public void testConvertPlanMessageDestination1() throws Exception {
+        testConvertPlan("plans/web-md-pre.xml", "plans/web-md-post.xml");
     }
 
-    public void testConvertPlan(String prePlanName) throws Exception {
+    public void testConvertPlan(String prePlanName, String postPlanName) throws Exception
{
         URL srcXml = classLoader.getResource(prePlanName);
-        URL expectedOutputXml = classLoader.getResource("plans/tomcat-post.xml");
+        URL expectedOutputXml = classLoader.getResource(postPlanName);
         XmlObject rawPlan = XmlBeansUtil.parse(srcXml);
         System.out.println("RAW PLAN " + rawPlan.toString());
         XmlObject expected = XmlObject.Factory.parse(expectedOutputXml);



Mime
View raw message