Title: [1518] trunk/core/jbehave-core/src/main/java/org/jbehave/scenario/parser: Ensured backward compatibility of ScenarioParser.
Revision
1518
Author
mauro
Date
2010-01-11 11:46:51 -0600 (Mon, 11 Jan 2010)

Log Message

Ensured backward compatibility of ScenarioParser.

Modified Paths


Diff

Modified: trunk/core/jbehave-core/src/main/java/org/jbehave/scenario/parser/PatternScenarioParser.java (1517 => 1518)

--- trunk/core/jbehave-core/src/main/java/org/jbehave/scenario/parser/PatternScenarioParser.java	2010-01-10 13:44:00 UTC (rev 1517)
+++ trunk/core/jbehave-core/src/main/java/org/jbehave/scenario/parser/PatternScenarioParser.java	2010-01-11 17:46:51 UTC (rev 1518)
@@ -41,9 +41,13 @@
 	    this(configuration.keywords());
 	}
 
-	public StoryDefinition defineStoryFrom(String wholeStoryAsString, String storyPath) {
-		Blurb blurb = parseBlurbFrom(wholeStoryAsString);
-		List<ScenarioDefinition> scenarioDefinitions = parseScenariosFrom(wholeStoryAsString);
+    public StoryDefinition defineStoryFrom(String wholeStoryAsText) {
+        return defineStoryFrom(wholeStoryAsText, null);
+    }
+    
+	public StoryDefinition defineStoryFrom(String wholeStoryAsText, String storyPath) {
+		Blurb blurb = parseBlurbFrom(wholeStoryAsText);
+		List<ScenarioDefinition> scenarioDefinitions = parseScenariosFrom(wholeStoryAsText);
 		return new StoryDefinition(blurb, storyPath, scenarioDefinitions);
 	}
 

Modified: trunk/core/jbehave-core/src/main/java/org/jbehave/scenario/parser/ScenarioParser.java (1517 => 1518)

--- trunk/core/jbehave-core/src/main/java/org/jbehave/scenario/parser/ScenarioParser.java	2010-01-10 13:44:00 UTC (rev 1517)
+++ trunk/core/jbehave-core/src/main/java/org/jbehave/scenario/parser/ScenarioParser.java	2010-01-11 17:46:51 UTC (rev 1518)
@@ -13,9 +13,18 @@
      * Defines story from its textual representation
      * 
      * @param storyAsText the textual representation
-     * @param storyPath the story path, may be <code>null</code> if not loaded from filesystem
      * @return The StoryDefinition
      */
+    StoryDefinition defineStoryFrom(String storyAsText);
+    
+    /**
+     * Defines story from its textual representation and (optional) story path
+     * 
+     * @param storyAsText the textual representation
+     * @param storyPath the story path, may be <code>null</code>
+     * @return The StoryDefinition
+     * @since 2.4
+     */
     StoryDefinition defineStoryFrom(String storyAsText, String storyPath);
 
 }


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to