geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r637572 - in /geronimo/gshell/trunk/gshell-model/src/test: java/org/apache/geronimo/gshell/model/application/ApplicationMarshallerTest.java resources/org/apache/geronimo/gshell/model/application/application1.xml
Date Sun, 16 Mar 2008 10:09:37 GMT
Author: jdillon
Date: Sun Mar 16 03:09:35 2008
New Revision: 637572

URL: http://svn.apache.org/viewvc?rev=637572&view=rev
Log:
More tests

Added:
    geronimo/gshell/trunk/gshell-model/src/test/resources/org/apache/geronimo/gshell/model/application/application1.xml
  (with props)
Modified:
    geronimo/gshell/trunk/gshell-model/src/test/java/org/apache/geronimo/gshell/model/application/ApplicationMarshallerTest.java

Modified: geronimo/gshell/trunk/gshell-model/src/test/java/org/apache/geronimo/gshell/model/application/ApplicationMarshallerTest.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-model/src/test/java/org/apache/geronimo/gshell/model/application/ApplicationMarshallerTest.java?rev=637572&r1=637571&r2=637572&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-model/src/test/java/org/apache/geronimo/gshell/model/application/ApplicationMarshallerTest.java
(original)
+++ geronimo/gshell/trunk/gshell-model/src/test/java/org/apache/geronimo/gshell/model/application/ApplicationMarshallerTest.java
Sun Mar 16 03:09:35 2008
@@ -23,6 +23,9 @@
 import org.apache.geronimo.gshell.model.common.Dependency;
 import org.apache.geronimo.gshell.model.common.DependencyGroup;
 
+import java.net.URL;
+import java.io.InputStream;
+
 /**
  * Test for the {@link ApplicationMarshaller} class.
  *
@@ -60,5 +63,21 @@
         assertNotNull(xml);
 
         System.out.println(xml);
+    }
+
+    public void testUnmarshal1_FromStream() throws Exception {
+        InputStream input = getClass().getResourceAsStream("application1.xml");
+
+        Application root = marshaller.unmarshal(input);
+
+        System.out.println(root);
+    }
+
+    public void testUnmarshal1_FromURL() throws Exception {
+        URL url = getClass().getResource("application1.xml");
+
+        Application root = marshaller.unmarshal(url);
+
+        System.out.println(root);
     }
 }

Added: geronimo/gshell/trunk/gshell-model/src/test/resources/org/apache/geronimo/gshell/model/application/application1.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-model/src/test/resources/org/apache/geronimo/gshell/model/application/application1.xml?rev=637572&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-model/src/test/resources/org/apache/geronimo/gshell/model/application/application1.xml
(added)
+++ geronimo/gshell/trunk/gshell-model/src/test/resources/org/apache/geronimo/gshell/model/application/application1.xml
Sun Mar 16 03:09:35 2008
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<application>
+
+    <dependencies>
+        <dependency>
+            <groupId>a</groupId>
+            <artifactId>b</artifactId>
+            <version>c</version>
+        </dependency>
+    </dependencies>
+
+    <dependencyGroups>
+        <dependencyGroup>
+            <groupId>d</groupId>
+            <version>e</version>
+            <dependency>
+                <artifactId>f</artifactId>
+            </dependency>
+            
+            <dependency>
+                <artifactId>g</artifactId>
+                <classifier>h</classifier>
+            </dependency>
+        </dependencyGroup>
+    </dependencyGroups>
+
+</application>
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-model/src/test/resources/org/apache/geronimo/gshell/model/application/application1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-model/src/test/resources/org/apache/geronimo/gshell/model/application/application1.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-model/src/test/resources/org/apache/geronimo/gshell/model/application/application1.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message