[jboss-cvs] JBossAS SVN: r112463 - in projects/jboss-jca/branches/Branch_1_0/deployers/src/test: resources and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Nov 21 09:24:05 EST 2011
Author: jesper.pedersen
Date: 2011-11-21 09:24:05 -0500 (Mon, 21 Nov 2011)
New Revision: 112463
Added:
projects/jboss-jca/branches/Branch_1_0/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/testcases/CamelCaseTestCase.java
projects/jboss-jca/branches/Branch_1_0/deployers/src/test/resources/CamelCase.rar/
projects/jboss-jca/branches/Branch_1_0/deployers/src/test/resources/CamelCase.rar/META-INF/
projects/jboss-jca/branches/Branch_1_0/deployers/src/test/resources/CamelCase.rar/META-INF/ra.xml
projects/jboss-jca/branches/Branch_1_0/deployers/src/test/resources/camel-case-ra.xml
Log:
Add camel case test case
Added: projects/jboss-jca/branches/Branch_1_0/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/testcases/CamelCaseTestCase.java
===================================================================
--- projects/jboss-jca/branches/Branch_1_0/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/testcases/CamelCaseTestCase.java (rev 0)
+++ projects/jboss-jca/branches/Branch_1_0/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/testcases/CamelCaseTestCase.java 2011-11-21 14:24:05 UTC (rev 112463)
@@ -0,0 +1,109 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008-2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jca.test.deployers.spec.rars.testcases;
+
+import org.jboss.jca.embedded.dsl.InputStreamDescriptor;
+import org.jboss.jca.test.deployers.spec.ArquillianJCATestUtils;
+import org.jboss.jca.test.deployers.spec.rars.multiple.MultipleAdminObject1;
+import org.jboss.jca.test.deployers.spec.rars.multiple.MultipleConnectionFactory1;
+
+import javax.annotation.Resource;
+
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive;
+import org.jboss.shrinkwrap.descriptor.api.Descriptor;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.assertNotNull;
+
+/**
+ * Test cases for deploying camel case resource adapter archives (.RAR) using -ra.xml files
+ * for activation
+ *
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+ at RunWith(Arquillian.class)
+public class CamelCaseTestCase
+{
+
+ //-------------------------------------------------------------------------------------||
+ //---------------------- GIVEN --------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+ /**
+ * Define the deployment
+ * @return The deployment archive
+ * @throws Exception in case of errors
+ */
+ @Deployment(order = 1)
+ public static ResourceAdapterArchive createDeployment() throws Exception
+ {
+ String archiveName = "CamelCase.rar";
+ String packageName = "org.jboss.jca.test.deployers.spec.rars.multiple";
+ ResourceAdapterArchive raa = ArquillianJCATestUtils.buidShrinkwrapRa(archiveName, packageName);
+ raa.addAsManifestResource(archiveName + "/META-INF/ra.xml", "ra.xml");
+
+ return raa;
+ }
+
+ /**
+ * Define the deployment
+ * @return The deployment archive
+ * @throws Exception in case of errors
+ */
+ @Deployment(order = 2)
+ public static Descriptor createDescriptor() throws Exception
+ {
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ InputStreamDescriptor isd = new InputStreamDescriptor("camel-case-ra.xml",
+ cl.getResourceAsStream("camel-case-ra.xml"));
+ return isd;
+ }
+
+ //-------------------------------------------------------------------------------------||
+ //---------------------- WHEN --------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+ //
+ @Resource(mappedName = "java:/eis/MultipleConnectionFactory1")
+ private MultipleConnectionFactory1 connectionFactory1;
+
+ @Resource(mappedName = "java:/eis/MultipleAdminObject1")
+ private MultipleAdminObject1 adminObject1;
+
+ //-------------------------------------------------------------------------------------||
+ //---------------------- THEN --------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Basic
+ * @exception Throwable Thrown if case of an error
+ */
+ @Test
+ public void testBasic() throws Throwable
+ {
+ assertNotNull(connectionFactory1);
+ assertNotNull(adminObject1);
+ }
+}
Added: projects/jboss-jca/branches/Branch_1_0/deployers/src/test/resources/CamelCase.rar/META-INF/ra.xml
===================================================================
--- projects/jboss-jca/branches/Branch_1_0/deployers/src/test/resources/CamelCase.rar/META-INF/ra.xml (rev 0)
+++ projects/jboss-jca/branches/Branch_1_0/deployers/src/test/resources/CamelCase.rar/META-INF/ra.xml 2011-11-21 14:24:05 UTC (rev 112463)
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.
+ */
+-->
+
+<connector 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/connector_1_5.xsd"
+ version="1.5">
+
+ <vendor-name>Red Hat Middleware LLC</vendor-name>
+ <eis-type>Test RA</eis-type>
+ <resourceadapter-version>0.1</resourceadapter-version>
+ <resourceadapter>
+ <resourceadapter-class>org.jboss.jca.test.deployers.spec.rars.multiple.MultipleResourceAdapter</resourceadapter-class>
+ <config-property>
+ <config-property-name>Name</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+
+ <outbound-resourceadapter>
+ <connection-definition>
+ <managedconnectionfactory-class>org.jboss.jca.test.deployers.spec.rars.multiple.MultipleManagedConnectionFactory1</managedconnectionfactory-class>
+ <config-property>
+ <config-property-name>Name</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+
+ <connectionfactory-interface>org.jboss.jca.test.deployers.spec.rars.multiple.MultipleConnectionFactory1</connectionfactory-interface>
+ <connectionfactory-impl-class>org.jboss.jca.test.deployers.spec.rars.multiple.MultipleConnectionFactory1Impl</connectionfactory-impl-class>
+ <connection-interface>org.jboss.jca.test.deployers.spec.rars.multiple.MultipleConnection1</connection-interface>
+ <connection-impl-class>org.jboss.jca.test.deployers.spec.rars.multiple.MultipleConnection1Impl</connection-impl-class>
+ </connection-definition>
+ <connection-definition>
+ <managedconnectionfactory-class>org.jboss.jca.test.deployers.spec.rars.multiple.MultipleManagedConnectionFactory2</managedconnectionfactory-class>
+ <config-property>
+ <config-property-name>Name</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+
+ <connectionfactory-interface>org.jboss.jca.test.deployers.spec.rars.multiple.MultipleConnectionFactory2</connectionfactory-interface>
+ <connectionfactory-impl-class>org.jboss.jca.test.deployers.spec.rars.multiple.MultipleConnectionFactory2Impl</connectionfactory-impl-class>
+ <connection-interface>org.jboss.jca.test.deployers.spec.rars.multiple.MultipleConnection2</connection-interface>
+ <connection-impl-class>org.jboss.jca.test.deployers.spec.rars.multiple.MultipleConnection2Impl</connection-impl-class>
+ </connection-definition>
+ <transaction-support>NoTransaction</transaction-support>
+ <reauthentication-support>false</reauthentication-support>
+ </outbound-resourceadapter>
+ <adminobject>
+ <adminobject-interface>org.jboss.jca.test.deployers.spec.rars.multiple.MultipleAdminObject1</adminobject-interface>
+ <adminobject-class>org.jboss.jca.test.deployers.spec.rars.multiple.MultipleAdminObject1Impl</adminobject-class>
+ <config-property>
+ <config-property-name>Name</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+
+ </adminobject>
+ <adminobject>
+ <adminobject-interface>org.jboss.jca.test.deployers.spec.rars.multiple.MultipleAdminObject2</adminobject-interface>
+ <adminobject-class>org.jboss.jca.test.deployers.spec.rars.multiple.MultipleAdminObject2Impl</adminobject-class>
+ <config-property>
+ <config-property-name>Name</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+
+ </adminobject>
+ </resourceadapter>
+</connector>
Added: projects/jboss-jca/branches/Branch_1_0/deployers/src/test/resources/camel-case-ra.xml
===================================================================
--- projects/jboss-jca/branches/Branch_1_0/deployers/src/test/resources/camel-case-ra.xml (rev 0)
+++ projects/jboss-jca/branches/Branch_1_0/deployers/src/test/resources/camel-case-ra.xml 2011-11-21 14:24:05 UTC (rev 112463)
@@ -0,0 +1,26 @@
+<resource-adapters>
+
+ <resource-adapter>
+ <archive>CamelCase.rar</archive>
+ <config-property name="Name">RA</config-property>
+
+ <transaction-support>NoTransaction</transaction-support>
+
+ <connection-definitions>
+ <connection-definition class-name="org.jboss.jca.test.deployers.spec.rars.multiple.MultipleManagedConnectionFactory1"
+ enabled="true" jndi-name="java:/eis/MultipleConnectionFactory1"
+ pool-name="MultipleConnectionFactory1">
+ <config-property name="Name">A</config-property>
+ </connection-definition>
+ </connection-definitions>
+
+ <admin-objects>
+ <admin-object class-name="org.jboss.jca.test.deployers.spec.rars.multiple.MultipleAdminObject1Impl"
+ jndi-name="java:/eis/MultipleAdminObject1">
+ <config-property name="Name">C</config-property>
+ </admin-object>
+ </admin-objects>
+
+ </resource-adapter>
+
+</resource-adapters>
More information about the jboss-cvs-commits
mailing list