Title: [1290] trunk/core/distribution/src/site/content: Made GivenWhenThenAnd extend I18nKeyWords.

Diff

Modified: trunk/core/distribution/src/site/content/configuring-scenarios.html (1289 => 1290)

--- trunk/core/distribution/src/site/content/configuring-scenarios.html	2009-10-04 13:16:11 UTC (rev 1289)
+++ trunk/core/distribution/src/site/content/configuring-scenarios.html	2009-10-05 07:30:34 UTC (rev 1290)
@@ -13,15 +13,43 @@
     href=""
 is the main interface for configuring all the components of a scenario.</p>
 
-<p>JBehave provides two implementations:</p>
+<p>The configurable elements of the scenario include:</p>
 <p><a
+    href=""
+Represents the strategy for the creation of executable steps from a
+given scenario definition matching a list of candidate steps. The
+default implementation is <a
+    href=""
+<p><a
+    href=""
+Loads scenarios contained in a story from a given scenario class. The
+default implementation is <a
+    href=""
+<p><a
+    href=""
+Allows the runner to report the state of running scenarios. The default
+implementation is <a
+    href=""
+
+<p><a
+    href=""
+Allows to define the strategy for error handling. The default value is <a
+    href=""
+
+<p><a
+    href=""
+Allows to specify the keywords used.  The default value is <a
+    href=""
+
+<p>JBehave provides two useful base implementations that users can
+extend to override only the elements that differ from default behaviour:</p>
+<p><a
     href=""
 provides default configuration that most user will find appropriate</p>
 <p><a
     href=""
 overrides default configuration via system properties</p>
 
-
 <h2>Configuring Steps</h2>
 
 <p>Steps can also be configured to a high degree via the <a
@@ -30,19 +58,22 @@
 <p><a
     href=""
 defaults to <a
-    href=""
+    href=""
 <p><a
     href=""
 defaults to <a
     href=""
 useful to either debug the step matching or to describe the steps being
-performed to some output</p>
+performed to some output.</p>
 <p><a
     href=""
 facade for collecting user-defined <a
-    href=""
+    href=""
+<p><a
+    href=""
+defaults to <a
+    href=""
 
-
 <div class="clear">
 <hr />
 </div>

Modified: trunk/core/distribution/src/site/content/dependencies.html (1289 => 1290)

--- trunk/core/distribution/src/site/content/dependencies.html	2009-10-04 13:16:11 UTC (rev 1289)
+++ trunk/core/distribution/src/site/content/dependencies.html	2009-10-05 07:30:34 UTC (rev 1290)
@@ -16,10 +16,13 @@
     <li><a href=""
     <li><a href=""
 </ul>
-<p><b>Attention</b>: if you use <b>junit.jar</b>, be awared that
-from version 4.4 it comes bundled bundled with a copy of Hamcrest API,
-so you may experience unpredictable behaviours based on the relative
-position of the jars in the classpath. It is advisable to use the <b>junit-dep.jar</b>
+<p>All dependencies are provided in the <b>lib</b> directory of
+binary distribution from the <a href="" page.</p>
+
+<p><b>Attention</b>: if you use <b>junit.jar</b>, be aware that from
+version 4.4 it comes bundled bundled with a copy of Hamcrest API, so you
+may experience unpredictable behaviours based on the relative position
+of the jars in the classpath. It is advisable to use the <b>junit-dep.jar</b>
 which is identitical, except that is come unbundled and any dependencies
 must be declared.</p>
 

Modified: trunk/core/distribution/src/site/content/download.html (1289 => 1290)

--- trunk/core/distribution/src/site/content/download.html	2009-10-04 13:16:11 UTC (rev 1289)
+++ trunk/core/distribution/src/site/content/download.html	2009-10-05 07:30:34 UTC (rev 1290)
@@ -8,9 +8,10 @@
 
 <h2>Stable releases</h2>
 
-<p>The stable releases of jBehave can be found on the <a
+<p>The stable releases of JBehave can be found on the <a
     href=""
-Repository</a>:
+Repository</a>:</p>
+
 <ul>
     <li><a
         href=""
@@ -19,7 +20,6 @@
         href=""
     src distribution</a></li>
 </ul>
-</p>
 
 <h2 id="snapshot">Latest Snapshot</h2>
 
@@ -32,7 +32,7 @@
 
 <p>If you use Maven as the build system (or one that is compatible
 with the Maven Repository, such as Ivy), you can declare JBehave
-dependency as
+dependency as</p>
 <pre class="brush: xml">
   <dependency> 
     <groupId>org.jbehave</groupId>
@@ -40,6 +40,7 @@
     <version>[version]</version>
   </dependency>
 </pre>
+<p>
 specifying the correct version.
 </p>
 

Modified: trunk/core/distribution/src/site/content/getting-started.html (1289 => 1290)

--- trunk/core/distribution/src/site/content/getting-started.html	2009-10-04 13:16:11 UTC (rev 1289)
+++ trunk/core/distribution/src/site/content/getting-started.html	2009-10-05 07:30:34 UTC (rev 1290)
@@ -71,7 +71,7 @@
 
         @Then("the grid should look like $grid")
         public void theGridShouldLookLike(String grid) {
-            ensureThat(renderer.asString(), equalTo(grid));
+            Ensure.ensureThat(renderer.asString(), CoreMatchers.equalTo(grid));
         }
 
       }

Modified: trunk/core/distribution/src/site/content/pending-steps.html (1289 => 1290)

--- trunk/core/distribution/src/site/content/pending-steps.html	2009-10-04 13:16:11 UTC (rev 1289)
+++ trunk/core/distribution/src/site/content/pending-steps.html	2009-10-05 07:30:34 UTC (rev 1290)
@@ -8,19 +8,21 @@
 
 <h2>Pending Steps</h2>
 
-<p>By default, JBehave does not fail with it encounters steps that
-do not match any method in the Steps class. These are called <b>pending</b>
-steps. This is because it is designed to allow scenario writers to write
-the textual scenario before the implementation (hence the
-behaviour-driven development). By marking a step as pending, it's
-telling the scenario writer that it's not yet implemented and
+<p>JBehave is designed to allow textual scenarios to be written
+before the implementation, i.e. to let the specification of the
+behaviour drive the development. For this reason, with steps that do not
+match any method in the Steps class, which are called <b>pending
+steps</b>, it does not fail by default. By marking a step as pending, it's
+simply telling the scenario writer that it's not yet implemented and
 correspondingly it will not execute any steps that following in the same
 scenario.</p>
 
 <p>In some cases, thought, it may be useful to make the scenarios
-fail when steps are pending. This is done by configuring the <a
+fail when steps are pending. The behaviour is controlled by configuring
+the <a
     href=""
-in <a href=""
+via the Scenario <a
+    href=""
 <pre class="brush: java">
 new Configuration(){
    public PendingErrorStrategy forPendingSteps() {

Modified: trunk/core/distribution/src/site/content/running-scenarios.html (1289 => 1290)

--- trunk/core/distribution/src/site/content/running-scenarios.html	2009-10-04 13:16:11 UTC (rev 1289)
+++ trunk/core/distribution/src/site/content/running-scenarios.html	2009-10-05 07:30:34 UTC (rev 1290)
@@ -59,6 +59,9 @@
     </plugin>
 </pre>
 
+<p><b>NOTE</b>: Running scenarios with Maven requires each Scenario class to have a constructor with a single ClassLoader parameter. 
+Maven uses this constructor to instantiate the Scenario class using the classpath constructed with the POM depedendencies.  
+</p>
 
 <div class="clear">
 <hr />

Modified: trunk/core/jbehave-core/src/behaviour/org/jbehave/scenario/PropertyBasedConfigurationBehaviour.java (1289 => 1290)

--- trunk/core/jbehave-core/src/behaviour/org/jbehave/scenario/PropertyBasedConfigurationBehaviour.java	2009-10-04 13:16:11 UTC (rev 1289)
+++ trunk/core/jbehave-core/src/behaviour/org/jbehave/scenario/PropertyBasedConfigurationBehaviour.java	2009-10-05 07:30:34 UTC (rev 1290)
@@ -4,9 +4,9 @@
 import static org.hamcrest.CoreMatchers.is;
 import static org.jbehave.Ensure.ensureThat;
 
-import org.jbehave.scenario.definition.ScenarioGivenWhenThenAnd;
 import org.jbehave.scenario.errors.ErrorStrategy;
 import org.jbehave.scenario.errors.PendingErrorStrategy;
+import org.jbehave.scenario.i18n.I18nKeyWords;
 import org.jbehave.scenario.reporters.PassSilentlyDecorator;
 import org.jbehave.scenario.reporters.PrintStreamScenarioReporter;
 import org.junit.After;
@@ -69,6 +69,6 @@
     
     @Test
     public void shouldProvideGivenWhenThenKeywordsByDefault() {
-        ensureThat(new PropertyBasedConfiguration().keywords(), is(ScenarioGivenWhenThenAnd.class));
+        ensureThat(new PropertyBasedConfiguration().keywords(), is(I18nKeyWords.class));
     }
 }

Modified: trunk/core/jbehave-core/src/java/org/jbehave/scenario/Configuration.java (1289 => 1290)

--- trunk/core/jbehave-core/src/java/org/jbehave/scenario/Configuration.java	2009-10-04 13:16:11 UTC (rev 1289)
+++ trunk/core/jbehave-core/src/java/org/jbehave/scenario/Configuration.java	2009-10-05 07:30:34 UTC (rev 1290)
@@ -13,15 +13,13 @@
  * Provides the configuration used by the {...@link ScenarioRunner} and is injected
  * in the {...@link Scenario} to customise its runtime properties.
  * 
- * NB: This class may change dynamically, so any other class wishing to use this
+ * The configuration may change dynamically, so any other class wishing to use this
  * should store the whole configuration, and use the respective parts of it at
  * runtime, rather than attempting to store any part of it when the
  * configuration is provided.
  * 
  * @author Elizabeth Keogh
  * @author Mauro Talevi
- * @see {...@link MostUsefulConfiguration}
- * @see {...@link PropertyBasedConfiguration}
  */
 public interface Configuration {
 

Modified: trunk/core/jbehave-core/src/java/org/jbehave/scenario/MostUsefulConfiguration.java (1289 => 1290)

--- trunk/core/jbehave-core/src/java/org/jbehave/scenario/MostUsefulConfiguration.java	2009-10-04 13:16:11 UTC (rev 1289)
+++ trunk/core/jbehave-core/src/java/org/jbehave/scenario/MostUsefulConfiguration.java	2009-10-05 07:30:34 UTC (rev 1290)
@@ -1,9 +1,10 @@
 package org.jbehave.scenario;
 
 import org.jbehave.scenario.definition.KeyWords;
-import org.jbehave.scenario.definition.ScenarioGivenWhenThenAnd;
 import org.jbehave.scenario.errors.ErrorStrategy;
+import org.jbehave.scenario.errors.ErrorStrategyInWhichWeTrustTheReporter;
 import org.jbehave.scenario.errors.PendingErrorStrategy;
+import org.jbehave.scenario.i18n.I18nKeyWords;
 import org.jbehave.scenario.parser.ClasspathScenarioDefiner;
 import org.jbehave.scenario.parser.PatternScenarioParser;
 import org.jbehave.scenario.parser.ScenarioDefiner;
@@ -27,7 +28,7 @@
  *   <li>{...@link ErrorStrategy}: ErrorStrategy.RETHROW</li>
  *   <li>{...@link PendingErrorStrategy}: PendingErrorStrategy.PASSING</li>
  *   <li>{...@link ScenarioReporter}: new PassSilentlyDecorator(new PrintStreamScenarioReporter())</li>
- *   <li>{...@link KeyWords}: new ScenarioGivenWhenThenAnd()</li>
+ *   <li>{...@link KeyWords}: new I18nKeyWords()</li>
  *   <li>{...@link StepdocGenerator}: new DefaultStepdocGenerator()</li>
  *   <li>{...@link StepdocReporter}: new PrintStreamStepdocReporter(true)</li>
  * </ul>
@@ -93,10 +94,10 @@
 	}
 
 	/**
-	 * Provides the keywords Scenario, Given, When, Then and And.
+	 * Provides the keywords in English
 	 */
 	public KeyWords keywords() {
-		return new ScenarioGivenWhenThenAnd();
+		return new I18nKeyWords();
 	}
 
 	/**

Modified: trunk/core/jbehave-core/src/java/org/jbehave/scenario/definition/ScenarioGivenWhenThenAnd.java (1289 => 1290)

--- trunk/core/jbehave-core/src/java/org/jbehave/scenario/definition/ScenarioGivenWhenThenAnd.java	2009-10-04 13:16:11 UTC (rev 1289)
+++ trunk/core/jbehave-core/src/java/org/jbehave/scenario/definition/ScenarioGivenWhenThenAnd.java	2009-10-05 07:30:34 UTC (rev 1290)
@@ -1,9 +1,11 @@
 package org.jbehave.scenario.definition;
 
-public class ScenarioGivenWhenThenAnd extends KeyWords {
+import org.jbehave.scenario.i18n.I18nKeyWords;
 
+public class ScenarioGivenWhenThenAnd extends I18nKeyWords {
+
     public ScenarioGivenWhenThenAnd() {
-        super("Scenario:", "GivenScenarios:", "Examples:", "Given", "When", "Then", "And");
+        super();
     }
 
 }


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to