Title: [1498] trunk/core/jbehave-core/src/behaviour/java/org/jbehave/scenario/steps: Refactored behaviours to reflect conversion to unix newlines.
Revision
1498
Author
mauro
Date
2010-01-05 11:02:48 -0600 (Tue, 05 Jan 2010)

Log Message

Refactored behaviours to reflect conversion to unix newlines.

Modified Paths


Diff

Modified: trunk/core/jbehave-core/src/behaviour/java/org/jbehave/scenario/steps/CandidateStepBehaviour.java (1497 => 1498)

--- trunk/core/jbehave-core/src/behaviour/java/org/jbehave/scenario/steps/CandidateStepBehaviour.java	2010-01-05 16:28:33 UTC (rev 1497)
+++ trunk/core/jbehave-core/src/behaviour/java/org/jbehave/scenario/steps/CandidateStepBehaviour.java	2010-01-05 17:02:48 UTC (rev 1498)
@@ -118,17 +118,16 @@
     }
 
     @Test
-    public void shouldNotFailJustBecauseWeHaveDifferentNewlinesToTheOneTheScenarioWasWrittenIn() throws Exception {
+    public void shouldConvertWindowsNewlinesToUnix() throws Exception {
         String windowsNewline = "\r\n";
         String unixNewline = "\n";
-        String systemNewline = System.getProperty("line.separator");
         SomeSteps someSteps = new SomeSteps();
         CandidateStep candidateStep = new CandidateStep("the grid should look like $grid", THEN, SomeSteps.class.getMethod(
 				        "aMethodWith", String.class), someSteps, PATTERN_BUILDER, new ParameterConverters(), startingWords);
         Step step = candidateStep.createFrom(tableRow, "Then the grid should look like" + windowsNewline + ".." + unixNewline
                 + ".." + windowsNewline);
         step.perform();
-        ensureThat((String) someSteps.args, equalTo(".." + systemNewline + ".." + systemNewline));
+        ensureThat((String) someSteps.args, equalTo(".." + unixNewline + ".." + unixNewline));
     }
 
     @Test

Modified: trunk/core/jbehave-pico/src/behaviour/java/org/jbehave/scenario/steps/pico/PicoEnabledCandidateStepBehaviour.java (1497 => 1498)

--- trunk/core/jbehave-pico/src/behaviour/java/org/jbehave/scenario/steps/pico/PicoEnabledCandidateStepBehaviour.java	2010-01-05 16:28:33 UTC (rev 1497)
+++ trunk/core/jbehave-pico/src/behaviour/java/org/jbehave/scenario/steps/pico/PicoEnabledCandidateStepBehaviour.java	2010-01-05 17:02:48 UTC (rev 1498)
@@ -135,10 +135,9 @@
     }
 
     @Test
-    public void shouldNotFailJustBecauseWeHaveDifferentNewlinesToTheOneTheScenarioWasWrittenIn() throws Exception {
+    public void shouldConvertWindowsNewlinesToUnix() throws Exception {
         String windowsNewline = "\r\n";
         String unixNewline = "\n";
-        String systemNewline = System.getProperty("line.separator");
         parent.as(Characteristics.USE_NAMES).addComponent(SomeSteps.class);
         SomeSteps someSteps = parent.getComponent(SomeSteps.class);
         PicoEnabledCandidateStep candidateStep = new PicoEnabledCandidateStep("the grid should look like $grid", THEN, SomeSteps.class.getMethod(
@@ -146,7 +145,7 @@
         Step step = candidateStep.createFrom(tableRow, "Then the grid should look like" + windowsNewline + ".." + unixNewline
                 + ".." + windowsNewline);
         step.perform();
-        ensureThat((String) someSteps.args, equalTo(".." + systemNewline + ".." + systemNewline));
+        ensureThat((String) someSteps.args, equalTo(".." + unixNewline + ".." + unixNewline));
     }
 
     @Test


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to