[jboss-cvs] JBossAS SVN: r66264 - in projects/metadata/trunk/src/test: resources/org/jboss/test/metadata/client and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 18 22:27:34 EDT 2007
Author: scott.stark at jboss.org
Date: 2007-10-18 22:27:34 -0400 (Thu, 18 Oct 2007)
New Revision: 66264
Added:
projects/metadata/trunk/src/test/java/org/jboss/test/metadata/client/ApplicationClient14UnitTestCase.java
projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/client/ApplicationClient14_testBasic.xml
Log:
Application client 1.4 tests
Added: projects/metadata/trunk/src/test/java/org/jboss/test/metadata/client/ApplicationClient14UnitTestCase.java
===================================================================
--- projects/metadata/trunk/src/test/java/org/jboss/test/metadata/client/ApplicationClient14UnitTestCase.java (rev 0)
+++ projects/metadata/trunk/src/test/java/org/jboss/test/metadata/client/ApplicationClient14UnitTestCase.java 2007-10-19 02:27:34 UTC (rev 66264)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors as indicated
+ * 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.metadata.client;
+
+import java.util.Set;
+
+import org.jboss.metadata.client.spec.ApplicationClient14MetaData;
+import org.jboss.metadata.client.spec.ApplicationClientMetaData;
+import org.jboss.metadata.ear.spec.Ear13DTDMetaData;
+import org.jboss.metadata.javaee.spec.LifecycleCallbacksMetaData;
+import org.jboss.metadata.javaee.spec.MessageDestinationMetaData;
+import org.jboss.metadata.javaee.spec.MessageDestinationsMetaData;
+import org.jboss.metadata.javaee.spec.PersistenceUnitReferencesMetaData;
+import org.jboss.metadata.javaee.spec.ResourceInjectionTargetMetaData;
+import org.jboss.test.metadata.javaee.AbstractJavaEEEverythingTest;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
+
+/**
+ * Test all entries of an application client 1.4 descriptor.
+ *
+ * @author Scott.Stark at jboss.org
+ * @version $Revision: $
+ */
+public class ApplicationClient14UnitTestCase extends AbstractJavaEEEverythingTest
+{
+
+ public ApplicationClient14UnitTestCase(String name)
+ {
+ super(name);
+ }
+
+ public static SchemaBindingResolver initResolver()
+ {
+ DefaultSchemaResolver resolver = new DefaultSchemaResolver();
+ resolver.addClassBindingForLocation("application-client_1_4.xsd", ApplicationClient14MetaData.class);
+ return resolver;
+ }
+
+ public void testBasic() throws Exception
+ {
+ ApplicationClientMetaData appClientMetaData = unmarshal();
+ assertEquals("1.4", appClientMetaData.getVersion());
+ }
+
+ protected ApplicationClientMetaData unmarshal() throws Exception
+ {
+ return unmarshal(ApplicationClientMetaData.class);
+ }
+}
Property changes on: projects/metadata/trunk/src/test/java/org/jboss/test/metadata/client/ApplicationClient14UnitTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ native
Added: projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/client/ApplicationClient14_testBasic.xml
===================================================================
--- projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/client/ApplicationClient14_testBasic.xml (rev 0)
+++ projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/client/ApplicationClient14_testBasic.xml 2007-10-19 02:27:34 UTC (rev 66264)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application-client version="1.4"
+ xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd">
+
+ <description>A sample application client descriptor</description>
+ <display-name>J2EE Client Tests</display-name>
+
+ <env-entry>
+ <env-entry-name>String0</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>String0Value</env-entry-value>
+ </env-entry>
+ <env-entry>
+ <env-entry-name>Float0</env-entry-name>
+ <env-entry-type>java.lang.Float</env-entry-type>
+ <env-entry-value>3.14</env-entry-value>
+ </env-entry>
+ <env-entry>
+ <env-entry-name>Long0</env-entry-name>
+ <env-entry-type>java.lang.Long</env-entry-type>
+ <env-entry-value>123456789</env-entry-value>
+ </env-entry>
+
+ <ejb-ref>
+ <ejb-ref-name>ejb/StatelessSessionBean</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>org.jboss.test.cts.interfaces.StatelessSessionHome</home>
+ <remote>org.jboss.test.cts.interfaces.StatelessSession</remote>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/StatelessSessionBean2</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>org.jboss.test.cts.interfaces.StatelessSessionHome</home>
+ <remote>org.jboss.test.cts.interfaces.StatelessSession</remote>
+ <ejb-link>StatelessSessionBean</ejb-link>
+ </ejb-ref>
+
+ <!-- URL Connection Factories (java:comp/env/url) -->
+ <resource-ref>
+ <description>The JBoss Web Site HomePage</description>
+ <res-ref-name>url/JBossHome</res-ref-name>
+ <res-type>java.net.URL</res-type>
+ <res-auth>Container</res-auth>
+ </resource-ref>
+ <resource-ref>
+ <description>SomeWebSite HomePage</description>
+ <res-ref-name>url/IndirectURL</res-ref-name>
+ <res-type>java.net.URL</res-type>
+ <res-auth>Container</res-auth>
+ </resource-ref>
+
+ <!-- A JMS destination (java:comp/env/jms) -->
+ <resource-env-ref>
+ <description>A test of the resource-env-ref tag</description>
+ <resource-env-ref-name>jms/aQueue</resource-env-ref-name>
+ <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
+ </resource-env-ref>
+
+ <message-destination-ref>
+ <message-destination-ref-name>jms/anotherQueue</message-destination-ref-name>
+ <message-destination-type>javax.jms.Queue</message-destination-type>
+ <message-destination-usage>Consumes</message-destination-usage>
+ </message-destination-ref>
+
+ <message-destination-ref>
+ <message-destination-ref-name>jms/anotherQueue2</message-destination-ref-name>
+ <message-destination-type>javax.jms.Queue</message-destination-type>
+ <message-destination-usage>Consumes</message-destination-usage>
+ <message-destination-link>TheOtherQueue</message-destination-link>
+ </message-destination-ref>
+
+ <callback-handler>org.jboss.test.client.test.SystemPropertyCallbackHandler</callback-handler>
+
+ <message-destination>
+ <message-destination-name>TheOtherQueue</message-destination-name>
+ </message-destination>
+</application-client>
\ No newline at end of file
Property changes on: projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/client/ApplicationClient14_testBasic.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ native
More information about the jboss-cvs-commits
mailing list