deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r896860 - in /websites/staging/deltaspike/trunk/content: ./ test-control.html
Date Sat, 08 Feb 2014 08:29:46 GMT
Author: buildbot
Date: Sat Feb  8 08:29:45 2014
New Revision: 896860

Log:
Staging update by buildbot for deltaspike

Modified:
    websites/staging/deltaspike/trunk/content/   (props changed)
    websites/staging/deltaspike/trunk/content/test-control.html

Propchange: websites/staging/deltaspike/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Feb  8 08:29:45 2014
@@ -1 +1 @@
-1565712
+1565939

Modified: websites/staging/deltaspike/trunk/content/test-control.html
==============================================================================
--- websites/staging/deltaspike/trunk/content/test-control.html (original)
+++ websites/staging/deltaspike/trunk/content/test-control.html Sat Feb  8 08:29:45 2014
@@ -91,6 +91,7 @@
 <li><a href="#jsf-via-myfaces-test">JSF (via MyFaces-Test)</a></li>
 </ul>
 </li>
+<li><a href="#mixed-tests">Mixed Tests</a></li>
 <li><a href="#spi">SPI</a><ul>
 <li><a href="#externalcontainer">ExternalContainer</a></li>
 </ul>
@@ -169,10 +170,24 @@
 <h1 id="optional-integrations">Optional Integrations</h1>
 <h2 id="jsf-via-myfaces-test">JSF (via MyFaces-Test)</h2>
 <p>add:</p>
-<p>org.apache.deltaspike.testcontrol.impl.jsf.MockedJsf2TestContainer</p>
+<p>org.apache.deltaspike.testcontrol.impl.jsf.MockedJsf2TestContainer
+or
+org.apache.deltaspike.testcontrol.impl.jsf.MockedJsfTestContainerAdapter</p>
 <p>to</p>
 <p>/META-INF/services/org.apache.deltaspike.testcontrol.spi.ExternalContainer</p>
 <p>(in your config-folder for tests e.g.: test/resources)</p>
+<h1 id="mixed-tests">Mixed Tests</h1>
+<p>Usually you should have one kind of tests per test-module.
+However, if you need to add e.g. a test without an external-container to your test-module
which uses external-containers, you can annotate your test with:</p>
+<div class="codehilite"><pre><span class="nd">@RunWith</span><span
class="o">(</span><span class="n">CdiTestRunner</span><span class="o">.</span><span
class="na">class</span><span class="o">)</span>
+<span class="nd">@TestControl</span><span class="o">(</span><span
class="n">startExternalContainers</span> <span class="o">=</span> <span
class="kc">false</span><span class="o">)</span>
+<span class="kd">public</span> <span class="kd">class</span> <span
class="nc">JsfContainerTest</span>
+<span class="o">{</span>
+    <span class="c1">//...</span>
+<span class="o">}</span>
+</pre></div>
+
+
 <h1 id="spi">SPI</h1>
 <h2 id="externalcontainer">ExternalContainer</h2>
 <p>org.apache.deltaspike.testcontrol.spi.ExternalContainer allows to integrate containers
which get started after the CDI container.



Mime
View raw message