openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlmonte...@apache.org
Subject svn commit: r1800061 - in /openwebbeans/meecrowave/trunk/meecrowave-doc/src/main: java/org/apache/meecrowave/doc/generator/ArquillianConfiguration.java jbake/content/testing/index.adoc
Date Tue, 27 Jun 2017 13:47:59 GMT
Author: jlmonteiro
Date: Tue Jun 27 13:47:59 2017
New Revision: 1800061

URL: http://svn.apache.org/viewvc?rev=1800061&view=rev
Log:
fixing arquillian sample in the doc

Modified:
    openwebbeans/meecrowave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/ArquillianConfiguration.java
    openwebbeans/meecrowave/trunk/meecrowave-doc/src/main/jbake/content/testing/index.adoc

Modified: openwebbeans/meecrowave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/ArquillianConfiguration.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/ArquillianConfiguration.java?rev=1800061&r1=1800060&r2=1800061&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/ArquillianConfiguration.java
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/ArquillianConfiguration.java
Tue Jun 27 13:47:59 2017
@@ -34,7 +34,7 @@ public class ArquillianConfiguration ext
                 "<arquillian xmlns=\"http://jboss.org/schema/arquillian\"\n" +
                 "            xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" +
                 "            xsi:schemaLocation=\"http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd\">\n"
+
-                "  <container qualifier=\"tomee-embedded\" default=\"true\">\n" +
+                "  <container qualifier=\"meecrowave\" default=\"true\">\n" +
                 "    <configuration>\n" +
                 Stream.of(MeecrowaveConfiguration.class.getDeclaredFields())
                         .sorted(Comparator.comparing(Field::getName))

Modified: openwebbeans/meecrowave/trunk/meecrowave-doc/src/main/jbake/content/testing/index.adoc
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-doc/src/main/jbake/content/testing/index.adoc?rev=1800061&r1=1800060&r2=1800061&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-doc/src/main/jbake/content/testing/index.adoc
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-doc/src/main/jbake/content/testing/index.adoc
Tue Jun 27 13:47:59 2017
@@ -22,25 +22,11 @@ Coordinates:
 
 === Rules and Runners
 
-Meecrowave provides two flavors of JUnit integration: mono or nor runners/rules. The mono
one will
-ensure there is a single container for the whole JVM where the other ones will follow JUnit
lifecycle (per class or test).
+Meecrowave provides two flavors of JUnit integration: standalone or runners/rules. The standalone
one will
+ensure there is a single container for the whole JVM. It also fits standalone environments
where you want to control the lifecycle.
+The other one will follow the JUnit lifecycle (per class or test rule).
 
-Here how to use the not mono rule:
-
-[source,java]
-----
-public class MeecrowaveRuleTest {
-    @ClassRule // started once for the class, @Rule would be per method
-    public static final MeecrowaveRule RULE = new MeecrowaveRule();
-
-    @Test
-    public void test() throws IOException {
-        // use "http://localhost:" + RULE.getConfiguration().getHttpPort()
-    }
-}
-----
-
-And here for the mono version:
+Here how to use the standalone flavor:
 
 [source,java]
 ----
@@ -61,12 +47,30 @@ public class MonoMeecrowaveRuleTest {
 }
 ----
 
-When using the mono runner, `@MonoMeecrowave.Runner.ConfigurationInject` allows to still
+When using the standalone, `@MonoMeecrowave.Runner.ConfigurationInject` allows to still
 access the configuration and random HTTP port.
 
-For the configuration, mono rule will use a global configuration shared by all tests. To
load it
+For the configuration, the standalone runner will use a global configuration shared by all
tests. To load it
 it will use a standard `ServiceLoader` on type `org.apache.meecrowave.Meecrowave$ConfigurationCustomizer`.
 
+And here is the one bound to the JUnit lifecycle
+
+[source,java]
+----
+public class MeecrowaveRuleTest {
+    @ClassRule // started once for the class, @Rule would be per method
+    public static final MeecrowaveRule RULE = new MeecrowaveRule();
+
+    @Test
+    public void test() throws IOException {
+        // use "http://localhost:" + RULE.getConfiguration().getHttpPort()
+    }
+}
+----
+
+As usual with JUnit rules, you can decide whereas the Meecrowave instance is bound to the
entire test class
+or a method by using @ClassRule or @Rule.
+
 === JUnit 5
 
 JUnit 5 integrates a new `Extension` system. It is not yet very well supported by IDEs but
you can already use it with



Mime
View raw message