Title: [875] trunk/jbehave-core/src/java/org/jbehave/scenario/steps/Steps.java: Renamed injected param to conform to field.
Revision
875
Author
mauro
Date
2008-07-21 04:45:52 -0500 (Mon, 21 Jul 2008)

Log Message

Renamed injected param to conform to field.

Modified Paths


Diff

Modified: trunk/jbehave-core/src/java/org/jbehave/scenario/steps/Steps.java (874 => 875)

--- trunk/jbehave-core/src/java/org/jbehave/scenario/steps/Steps.java	2008-07-20 20:28:57 UTC (rev 874)
+++ trunk/jbehave-core/src/java/org/jbehave/scenario/steps/Steps.java	2008-07-21 09:45:52 UTC (rev 875)
@@ -8,51 +8,41 @@
 import org.jbehave.scenario.annotations.When;
 
 public class Steps {
-	
-	private final StepPatternBuilder patternBuilder;
+
+    private final StepPatternBuilder patternBuilder;
     private final StepMonitor monitor;
-    @SuppressWarnings("unchecked")
     private final String[] startingWords;
-	
-	public Steps() {
-		this(new DollarStepPatternBuilder(), new SilentStepMonitor(),
-		"Given", "When", "Then", "And");
-	}
 
-	public Steps(StepPatternBuilder patternConverter, StepMonitor monitor, 
-			String... startingWords) {
-		this.patternBuilder = patternConverter;
-		this.monitor = monitor;
-		this.startingWords = startingWords;
-	}
+    public Steps() {
+        this(new DollarStepPatternBuilder(), new SilentStepMonitor(), "Given", "When", "Then", "And");
+    }
 
-	/**
-	 * Returns all the steps that can be performed by this class.
-	 */
-	public CandidateStep[] getSteps() {
-		ArrayList<CandidateStep> steps = new ArrayList<CandidateStep>();
-		for (Method method : this.getClass().getMethods()) {
-			if (method.isAnnotationPresent(Given.class)) {
-				createCandidateStep(steps, method, method.getAnnotation(Given.class).value());
-			}
-			if (method.isAnnotationPresent(When.class)) {
-				createCandidateStep(steps, method, method.getAnnotation(When.class).value());
-			}
-			if (method.isAnnotationPresent(Then.class)) {
-				createCandidateStep(steps, method, method.getAnnotation(Then.class).value());
-			}
-		}
-		return steps.toArray(new CandidateStep[steps.size()]);
-	}
+    public Steps(StepPatternBuilder patternBuilder, StepMonitor monitor, String... startingWords) {
+        this.patternBuilder = patternBuilder;
+        this.monitor = monitor;
+        this.startingWords = startingWords;
+    }
 
-	private void createCandidateStep(ArrayList<CandidateStep> steps,
-			Method method, String stepAsString) {
-		steps.add(new CandidateStep(
-				stepAsString, 
-				method, 
-				this, 
-				patternBuilder, 
-				monitor, 
-				startingWords));
-	}
+    /**
+     * Returns all the steps that can be performed by this class.
+     */
+    public CandidateStep[] getSteps() {
+        ArrayList<CandidateStep> steps = new ArrayList<CandidateStep>();
+        for (Method method : this.getClass().getMethods()) {
+            if (method.isAnnotationPresent(Given.class)) {
+                createCandidateStep(steps, method, method.getAnnotation(Given.class).value());
+            }
+            if (method.isAnnotationPresent(When.class)) {
+                createCandidateStep(steps, method, method.getAnnotation(When.class).value());
+            }
+            if (method.isAnnotationPresent(Then.class)) {
+                createCandidateStep(steps, method, method.getAnnotation(Then.class).value());
+            }
+        }
+        return steps.toArray(new CandidateStep[steps.size()]);
+    }
+
+    private void createCandidateStep(ArrayList<CandidateStep> steps, Method method, String stepAsString) {
+        steps.add(new CandidateStep(stepAsString, method, this, patternBuilder, monitor, startingWords));
+    }
 }


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to