[seam-commits] Seam SVN: r14617 - in branches/community/Seam_2_3/examples-ee6/hibernate: hibernate-tests/src/test/resources-integration and 1 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Fri Apr 20 05:00:21 EDT 2012


Author: maschmid
Date: 2012-04-20 05:00:20 -0400 (Fri, 20 Apr 2012)
New Revision: 14617

Added:
   branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/java/org/jboss/seam/example/hibernate/test/Deployments.java
   branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/resources-integration/arquillian.xml
   branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/resources-integration/web.xml
Removed:
   branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/resources-integration/testng.xml
Modified:
   branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/java/org/jboss/seam/example/hibernate/test/BookingTest.java
   branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/java/org/jboss/seam/example/hibernate/test/ChangePasswordTest.java
   branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/java/org/jboss/seam/example/hibernate/test/LoginTest.java
   branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-web/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
Log:
hibernate example seamtests


Modified: branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/java/org/jboss/seam/example/hibernate/test/BookingTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/java/org/jboss/seam/example/hibernate/test/BookingTest.java	2012-04-20 08:42:20 UTC (rev 14616)
+++ branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/java/org/jboss/seam/example/hibernate/test/BookingTest.java	2012-04-20 09:00:20 UTC (rev 14617)
@@ -10,17 +10,29 @@
 import javax.faces.model.DataModel;
 import javax.faces.model.ListDataModel;
 
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.OverProtocol;
+import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.seam.contexts.Contexts;
 import org.jboss.seam.core.Manager;
 import org.jboss.seam.example.hibernate.Booking;
 import org.jboss.seam.example.hibernate.Hotel;
 import org.jboss.seam.example.hibernate.HotelBookingAction;
 import org.jboss.seam.example.hibernate.User;
-import org.jboss.seam.mock.SeamTest;
-import org.testng.annotations.Test;
+import org.jboss.seam.mock.JUnitSeamTest;
+import org.jboss.shrinkwrap.api.Archive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
-public class BookingTest extends SeamTest
+ at RunWith(Arquillian.class)
+public class BookingTest extends JUnitSeamTest
 {
+   @Deployment(name="BookingTest")
+   @OverProtocol("Servlet 3.0")
+   public static Archive<?> createDeployment()
+   {
+       return Deployments.hibernateDeployment();
+   }
    
    @Test
    public void testBookHotel() throws Exception

Modified: branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/java/org/jboss/seam/example/hibernate/test/ChangePasswordTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/java/org/jboss/seam/example/hibernate/test/ChangePasswordTest.java	2012-04-20 08:42:20 UTC (rev 14616)
+++ branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/java/org/jboss/seam/example/hibernate/test/ChangePasswordTest.java	2012-04-20 09:00:20 UTC (rev 14617)
@@ -1,15 +1,27 @@
 //$Id: ChangePasswordTest.java 6987 2007-12-23 19:53:07Z pmuir $
 package org.jboss.seam.example.hibernate.test;
 
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.OverProtocol;
+import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.seam.contexts.Contexts;
 import org.jboss.seam.core.Manager;
 import org.jboss.seam.example.hibernate.User;
-import org.jboss.seam.mock.SeamTest;
-import org.testng.annotations.Test;
+import org.jboss.seam.mock.JUnitSeamTest;
+import org.jboss.shrinkwrap.api.Archive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
-public class ChangePasswordTest extends SeamTest
+ at RunWith(Arquillian.class)
+public class ChangePasswordTest extends JUnitSeamTest
 {
-   
+   @Deployment(name="ChangePasswordTest")
+   @OverProtocol("Servlet 3.0")
+   public static Archive<?> createDeployment()
+   {
+       return Deployments.hibernateDeployment();
+   }
+
    @Test
    public void testChangePassword() throws Exception
    {

Added: branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/java/org/jboss/seam/example/hibernate/test/Deployments.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/java/org/jboss/seam/example/hibernate/test/Deployments.java	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/java/org/jboss/seam/example/hibernate/test/Deployments.java	2012-04-20 09:00:20 UTC (rev 14617)
@@ -0,0 +1,21 @@
+package org.jboss.seam.example.hibernate.test;
+
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.importer.ZipImporter;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+
+import java.io.File;
+
+public class Deployments {
+    public static WebArchive hibernateDeployment() {
+       WebArchive web = ShrinkWrap.create(ZipImporter.class, "jboss-seam-hibernate.war").importFrom(new File("../hibernate-web/target/jboss-seam-hibernate.war"))
+              .as(WebArchive.class);
+
+        // Install org.jboss.seam.mock.MockSeamListener
+        web.delete("/WEB-INF/web.xml");
+        web.addAsWebInfResource("web.xml");
+        
+        return web;
+    }
+}

Modified: branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/java/org/jboss/seam/example/hibernate/test/LoginTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/java/org/jboss/seam/example/hibernate/test/LoginTest.java	2012-04-20 08:42:20 UTC (rev 14616)
+++ branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/java/org/jboss/seam/example/hibernate/test/LoginTest.java	2012-04-20 09:00:20 UTC (rev 14617)
@@ -1,14 +1,26 @@
 //$Id: LoginTest.java 6987 2007-12-23 19:53:07Z pmuir $
 package org.jboss.seam.example.hibernate.test;
 
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.OverProtocol;
+import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.seam.core.Manager;
 import org.jboss.seam.web.Session;
-import org.jboss.seam.mock.SeamTest;
-import org.testng.annotations.Test;
+import org.jboss.seam.mock.JUnitSeamTest;
+import org.jboss.shrinkwrap.api.Archive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
-public class LoginTest extends SeamTest
+ at RunWith(Arquillian.class)
+public class LoginTest extends JUnitSeamTest
 {
-   
+   @Deployment(name="LoginTest")
+   @OverProtocol("Servlet 3.0")
+   public static Archive<?> createDeployment()
+   {
+       return Deployments.hibernateDeployment();
+   }
+
    @Test
    public void testLoginComponent() throws Exception
    {

Added: branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/resources-integration/arquillian.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/resources-integration/arquillian.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/resources-integration/arquillian.xml	2012-04-20 09:00:20 UTC (rev 14617)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns="http://jboss.org/schema/arquillian"
+    xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
+
+    <engine>
+        <property name="deploymentExportPath">target/</property>
+    </engine>
+
+    <container qualifier="jboss" default="true">
+        <configuration>
+            <property name="javaVmArguments">-Xmx1024m -XX:MaxPermSize=512m</property>
+            <property name="jbossHome">target/jboss-as-${version.jbossas7}</property>
+        </configuration>
+    </container>
+
+</arquillian>

Deleted: branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/resources-integration/testng.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/resources-integration/testng.xml	2012-04-20 08:42:20 UTC (rev 14616)
+++ branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/resources-integration/testng.xml	2012-04-20 09:00:20 UTC (rev 14617)
@@ -1,13 +0,0 @@
-<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
-
-<suite name="Hotel Booking" verbose="2" parallel="false">
-
-   <test name="Hibernate Booking">
-     <classes>
-       <class name="org.jboss.seam.example.hibernate.test.LoginTest"/>
-       <class name="org.jboss.seam.example.hibernate.test.BookingTest"/>
-       <class name="org.jboss.seam.example.hibernate.test.ChangePasswordTest"/>
-     </classes>
-   </test>
-	
-</suite>
\ No newline at end of file

Added: branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/resources-integration/web.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/resources-integration/web.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-tests/src/test/resources-integration/web.xml	2012-04-20 09:00:20 UTC (rev 14617)
@@ -0,0 +1,12 @@
+<?xml version="1.0" ?>
+
+<web-app version="3.0"
+         xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+         
+    <listener>
+        <listener-class>org.jboss.seam.mock.MockSeamListener</listener-class>
+    </listener>
+
+</web-app>

Modified: branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-web/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-web/src/main/webapp/WEB-INF/jboss-deployment-structure.xml	2012-04-20 08:42:20 UTC (rev 14616)
+++ branches/community/Seam_2_3/examples-ee6/hibernate/hibernate-web/src/main/webapp/WEB-INF/jboss-deployment-structure.xml	2012-04-20 09:00:20 UTC (rev 14617)
@@ -4,6 +4,7 @@
           <module name="org.javassist" export="true"/>
           <module name="org.dom4j" export="true"/>
           <module name="org.hibernate" export="true"/>
+          <module name="org.hibernate.envers" export="true"/>
       </dependencies>
     </deployment>   
 </jboss-deployment-structure> 



More information about the seam-commits mailing list