[seam-commits] Seam SVN: r14610 - branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Thu Apr 19 11:48:59 EDT 2012
Author: maschmid
Date: 2012-04-19 11:48:58 -0400 (Thu, 19 Apr 2012)
New Revision: 14610
Modified:
branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Testing.xml
Log:
update testing docs wrt. MockSeamListener
Modified: branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Testing.xml
===================================================================
--- branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Testing.xml 2012-04-19 15:35:53 UTC (rev 14609)
+++ branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Testing.xml 2012-04-19 15:48:58 UTC (rev 14610)
@@ -825,17 +825,20 @@
</note>
<para>
- The changes that still has to be done are:
+ The following changes must be done to run a SeamTest with Arquillian:
</para>
<itemizedlist>
<listitem>
- <para>Creating the <literal>@Deployment</literal> method.</para>
+ <para>Create the <literal>@Deployment</literal> method.</para>
</listitem>
<listitem>
- <para>Converting the test to JUnit. A <literal>JUnitSeamTest</literal>
+ <para>Convert the test to JUnit. A <literal>JUnitSeamTest</literal>
class can now be used instead of the original <literal>SeamTest</literal>.</para>
</listitem>
+ <listitem>
+ <para>Replace the <literal>SeamListener</literal> with <literal>org.jboss.seam.mock.MockSeamListener</literal> in web.xml.</para>
+ </listitem>
</itemizedlist>
@@ -853,6 +856,11 @@
.as(EnterpriseArchive.class);
WebArchive web = er.getAsType(WebArchive.class, "registration-web.war");
web.addClasses(RegisterTest.class);
+
+ // Replacing the SeamListener with MockSeamListener
+ web.delete("/WEB-INF/web.xml");
+ web.addAsWebInfResource("WEB-INF/mock-web.xml", "web.xml");
+
return er;
}
@@ -881,6 +889,25 @@
}]]></programlisting>
</example>
+
+ <example>
+ <title>mock-web.xml</title>
+ <programlisting role="XML"><![CDATA[
+<?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>
+]]></programlisting>
+
+ </example>
+
</section>
</section>
More information about the seam-commits
mailing list