[jbehave-dev] [jira] (JBEHAVE-1076) Travis builds failing

2015-04-08 Thread Alberto Scotto (JIRA)
Title: Message Title










 

 Alberto Scotto created an issue


















 JBehave /  JBEHAVE-1076



  Travis builds failing 










Issue Type:

  Task




Assignee:


 Unassigned




Components:


 Build




Created:


 08/Apr/15 7:18 PM




Priority:

  Major




Reporter:

 Alberto Scotto










From my findings, it looks like the problem is the settings.xml file.
E.g. this works - https://travis-ci.org/alb-i986/jbehave-core/builds/57723534 this does not - https://travis-ci.org/alb-i986/jbehave-core/builds/57725840
The latter fails because of these:



[WARNING] Could not validate integrity of download from http://maven.jenkins-ci.org/content/repositories/releases/org/apache/maven/plugins/maven-surefire-plugin/2.17/maven-surefire-plugin-2.17.jar: Checksum validation failed, no checksums available
[WARNING] Checksum validation failed, no checksums available for http://maven.jenkins-ci.org/content/repositories/releases/org/apache/maven/plugins/maven-surefire-plugin/2.17/maven-surefire-plugin-2.17.jar



The thing is that that URL does not exist:



$ curl -I http://maven.jenkins-ci.org/content/repositories/releases/org/apache/maven/plugins/maven-surefire-plugin/2.17/maven-surefire-plugin-2.17.jar

HTTP/1.1 404 Not Found
Date: Thu, 09 Apr 2015 00:15:17 GMT
Server: nginx
Content-Type: 

[jbehave-dev] [jira] (JBEHAVE-1076) Travis builds failing

2015-04-08 Thread Alberto Scotto (JIRA)
Title: Message Title










 

 Alberto Scotto updated an issue


















 JBehave /  JBEHAVE-1076



  Travis builds failing 










Change By:

 Alberto Scotto









 Frommyfindings,itlooksliketheproblemisthesettings.xmlfile.E.g.this  works  -https://travis-ci.org/alb-i986/jbehave-core/builds/57723534thisdoesnot-https://travis-ci.org/alb-i986/jbehave-core/builds/57725840Thelatterfailsbecauseofthese:{code}[WARNING]Couldnotvalidateintegrityofdownloadfromhttp://maven.jenkins-ci.org/content/repositories/releases/org/apache/maven/plugins/maven-surefire-plugin/2.17/maven-surefire-plugin-2.17.jar:Checksumvalidationfailed,nochecksumsavailable[WARNING]Checksumvalidationfailed,nochecksumsavailableforhttp://maven.jenkins-ci.org/content/repositories/releases/org/apache/maven/plugins/maven-surefire-plugin/2.17/maven-surefire-plugin-2.17.jar{code}ThethingisthatthatURLdoesnotexist:{code}$curl-Ihttp://maven.jenkins-ci.org/content/repositories/releases/org/apache/maven/plugins/maven-surefire-plugin/2.17/maven-surefire-plugin-2.17.jarHTTP/1.1404NotFoundDate:Thu,09Apr201500:15:17GMTServer:nginxContent-Type:application/json;charset=ISO-8859-1X-Artifactory-Id:oss1-use-1d-jenkinsciVia:1.1maven.jenkins-ci.orgSet-Cookie:SERVERID=local;path=/{code}I'mnotsureifit'sabugtoreporttotravis,orsomethingwrongwithoursettings.xml.Anythoughts? BTW,theformerworks(i.e.candownloaddeps)but*fails*becauseitneedstoknowthecustommavenrepowhichhappenstobedefinedinsettings.xml.Kindofarecursiveissue!












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1075) Add FlexibleEnumConverter, able to convert lower-cased, space-separated values to Enums

2015-04-08 Thread Alberto Scotto (JIRA)
Title: Message Title










 

 Alberto Scotto created an issue


















 JBehave /  JBEHAVE-1075



  Add FlexibleEnumConverter, able to convert lower-cased, space-separated values to Enums 










Issue Type:

  New Feature




Assignee:


 Unassigned




Components:


 Core




Created:


 08/Apr/15 12:37 PM




Priority:

  Major




Reporter:

 Alberto Scotto










Copyingpasting from the javadoc:
An EnumConverter allowing stories prose to be more natural. Before performing the actual conversion, it transforms values to upper-case, with any non-alphanumeric character replaced by an underscore ('_').
Example: assuming we have defined the step Given I am on the $page which is mapped to the method iAmOnPage(PageEnum page), we can then write in a scenario:
 Given I am on the login page
instead of:
 Given I am on the LOGIN_PAGE
Warning. This requires enum constants to follow the standard conventions for constant names, i.e. all uppercase letters, with words separated by underscores.












   

 Add 

[jbehave-dev] [jira] (JBEHAVE-1075) Add FluentEnumConverter, able to convert lower-cased, space-separated values to Enums

2015-04-08 Thread Alberto Scotto (JIRA)
Title: Message Title










 

 Alberto Scotto updated an issue


















 JBehave /  JBEHAVE-1075



  Add FluentEnumConverter, able to convert lower-cased, space-separated values to Enums 










Change By:

 Alberto Scotto




Summary:

 Add FlexibleEnumConverter FluentEnumConverter ,abletoconvertlower-cased,space-separatedvaluestoEnums












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-scm] [scm-core][2/2] JBEHAVE-1075: Minor tidy up.

2015-04-08 Thread Mauro Talevi
commit d463814e7602de6a856fea3ba15eabb171934c2f
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Wed, 8 Apr 2015 19:30:24 +0100
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Wed, 8 Apr 2015 19:30:24 +0100

JBEHAVE-1075:  Minor tidy up.

diff --git 
a/jbehave-core/src/main/java/org/jbehave/core/steps/ParameterConverters.java 
b/jbehave-core/src/main/java/org/jbehave/core/steps/ParameterConverters.java
index e1d1122..b69d5c6 100755
--- a/jbehave-core/src/main/java/org/jbehave/core/steps/ParameterConverters.java
+++ b/jbehave-core/src/main/java/org/jbehave/core/steps/ParameterConverters.java
@@ -601,8 +601,7 @@ public class ParameterConverters {
 
 @Override
 public Object convertValue(String value, Type type) {
-String transformedValue = value.replaceAll(\\W, 
_).toUpperCase();
-return super.convertValue(transformedValue, type);
+return super.convertValue(value.replaceAll(\\W, 
_).toUpperCase(), type);
 }
 }
 
diff --git 
a/jbehave-core/src/test/java/org/jbehave/core/steps/ParameterConvertersBehaviour.java
 
b/jbehave-core/src/test/java/org/jbehave/core/steps/ParameterConvertersBehaviour.java
index 8ddb0f2..3e16a5a 100755
--- 
a/jbehave-core/src/test/java/org/jbehave/core/steps/ParameterConvertersBehaviour.java
+++ 
b/jbehave-core/src/test/java/org/jbehave/core/steps/ParameterConvertersBehaviour.java
@@ -40,11 +40,9 @@ import org.jbehave.core.steps.SomeSteps.MyParameters;
 import org.junit.Test;
 
 import static org.hamcrest.MatcherAssert.assertThat;
-
 import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.instanceOf;
 import static org.hamcrest.Matchers.is;
-
 import static org.junit.Assert.fail;
 import static org.mockito.Mockito.mock;
 
@@ -64,7 +62,7 @@ public class ParameterConvertersBehaviour {
 }
 
 private void assertThatDefaultConvertersInclude(ParameterConverter[] 
defaultConverters,
-Class? extends ParameterConverter... converterTypes) {
+@SuppressWarnings(unchecked) Class? extends 
ParameterConverter... converterTypes) {
 for (Class? extends ParameterConverter type : converterTypes) {
 boolean found = false;
 for (ParameterConverter converter : defaultConverters) {
@@ -461,7 +459,7 @@ public class ParameterConvertersBehaviour {
 }
 
 @Test
-public void flexibleEnumConverter_givenLowercasedSpaceSeparatedValue() {
+public void shouldConvertEnumFluently() {
 ParameterConverter converter = new FluentEnumConverter();
 assertThat(converter.accept(SomeEnum.class), equalTo(true));
 assertThat((SomeEnum) converter.convertValue(multiple words and 1 
number, SomeEnum.class), equalTo(SomeEnum.MULTIPLE_WORDS_AND_1_NUMBER));





[jbehave-scm] [scm-core][1/2] JBEHAVE-1075: add FluentEnumConverter

2015-04-08 Thread Alberto Scotto
commit bd5e502d150216576429cd8b4208023251e5bd6e
Author: Alberto Scotto scotto.alberto...@gmail.com
AuthorDate: Sun, 22 Mar 2015 12:44:41 +
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Wed, 8 Apr 2015 19:25:15 +0100

JBEHAVE-1075: add FluentEnumConverter

..an EnumConverter able to convert lower-cased, space-separated values to
enum constants.
Before performing the actual conversion, it transforms values to upper-case,
with any non-alphanumeric character replaced by an underscore ('_').

diff --git 
a/jbehave-core/src/main/java/org/jbehave/core/steps/ParameterConverters.java 
b/jbehave-core/src/main/java/org/jbehave/core/steps/ParameterConverters.java
index 28be319..e1d1122 100755
--- a/jbehave-core/src/main/java/org/jbehave/core/steps/ParameterConverters.java
+++ b/jbehave-core/src/main/java/org/jbehave/core/steps/ParameterConverters.java
@@ -576,6 +576,37 @@ public class ParameterConverters {
 }
 
 /**
+ * An {@link EnumConverter} allowing stories prose to be more natural.
+ * Before performing the actual conversion, it transforms values to 
upper-case,
+ * with any non-alphanumeric character replaced by an underscore ('_').
+ * p
+ * bExample/b:
+ * assuming we have defined the step {@code Given I am on the $page}
+ * which is mapped to the method {@code iAmOnPage(PageEnum page)},
+ * we can then write in a scenario:
+ * pre{@code
+ * Given I am on the login page
+ * }/pre
+ * instead of:
+ * pre{@code
+ * Given I am on the LOGIN_PAGE
+ * }/pre
+ * p
+ * bWarning/b. This irequires/i enum constants to follow the
+ * a 
href=https://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s5.2.4-constant-names;
+ * standard conventions for constant names/a, i.e. all uppercase letters,
+ * with words separated by underscores.
+ */
+public static class FluentEnumConverter extends EnumConverter {
+
+@Override
+public Object convertValue(String value, Type type) {
+String transformedValue = value.replaceAll(\\W, 
_).toUpperCase();
+return super.convertValue(transformedValue, type);
+}
+}
+
+/**
  * Parses value to list of the same {@link Enum}, using an injectable value
  * separator (defaults to ,) and trimming each element of the list.
  */
diff --git 
a/jbehave-core/src/test/java/org/jbehave/core/steps/ParameterConvertersBehaviour.java
 
b/jbehave-core/src/test/java/org/jbehave/core/steps/ParameterConvertersBehaviour.java
index 872c1a2..8ddb0f2 100755
--- 
a/jbehave-core/src/test/java/org/jbehave/core/steps/ParameterConvertersBehaviour.java
+++ 
b/jbehave-core/src/test/java/org/jbehave/core/steps/ParameterConvertersBehaviour.java
@@ -29,6 +29,7 @@ import 
org.jbehave.core.steps.ParameterConverters.EnumConverter;
 import org.jbehave.core.steps.ParameterConverters.EnumListConverter;
 import org.jbehave.core.steps.ParameterConverters.ExamplesTableConverter;
 import 
org.jbehave.core.steps.ParameterConverters.ExamplesTableParametersConverter;
+import org.jbehave.core.steps.ParameterConverters.FluentEnumConverter;
 import org.jbehave.core.steps.ParameterConverters.MethodReturningConverter;
 import org.jbehave.core.steps.ParameterConverters.NumberConverter;
 import org.jbehave.core.steps.ParameterConverters.NumberListConverter;
@@ -459,6 +460,13 @@ public class ParameterConvertersBehaviour {
 assertThat((SomeEnum) converter.convertValue(ONE, type), 
equalTo(SomeEnum.ONE));
 }
 
+@Test
+public void flexibleEnumConverter_givenLowercasedSpaceSeparatedValue() {
+ParameterConverter converter = new FluentEnumConverter();
+assertThat(converter.accept(SomeEnum.class), equalTo(true));
+assertThat((SomeEnum) converter.convertValue(multiple words and 1 
number, SomeEnum.class), equalTo(SomeEnum.MULTIPLE_WORDS_AND_1_NUMBER));
+}
+
 
 @Test(expected = ParameterConvertionFailed.class)
 public void shouldFailToConvertEnumForValueNotDefined() throws 
IntrospectionException {
diff --git a/jbehave-core/src/test/java/org/jbehave/core/steps/SomeSteps.java 
b/jbehave-core/src/test/java/org/jbehave/core/steps/SomeSteps.java
index 018a40c..b2c07aa 100755
--- a/jbehave-core/src/test/java/org/jbehave/core/steps/SomeSteps.java
+++ b/jbehave-core/src/test/java/org/jbehave/core/steps/SomeSteps.java
@@ -169,5 +169,7 @@ public class SomeSteps extends Steps {
 enum SomeEnum {
 ONE,
 TWO,
-THREE;
+THREE,
+MULTIPLE_WORDS_AND_1_NUMBER,
+;
 }





[jbehave-scm] [scm-core/jbehave-4.x][2/2] JBEHAVE-1075: Minor tidy up.

2015-04-08 Thread Mauro Talevi
commit 3d8b2a125746dcf3110634dcf6731e5fe55626b0
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Wed, 8 Apr 2015 19:30:24 +0100
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Wed, 8 Apr 2015 19:31:01 +0100

JBEHAVE-1075:  Minor tidy up.

diff --git 
a/jbehave-core/src/main/java/org/jbehave/core/steps/ParameterConverters.java 
b/jbehave-core/src/main/java/org/jbehave/core/steps/ParameterConverters.java
index e1d1122..b69d5c6 100755
--- a/jbehave-core/src/main/java/org/jbehave/core/steps/ParameterConverters.java
+++ b/jbehave-core/src/main/java/org/jbehave/core/steps/ParameterConverters.java
@@ -601,8 +601,7 @@ public class ParameterConverters {
 
 @Override
 public Object convertValue(String value, Type type) {
-String transformedValue = value.replaceAll(\\W, 
_).toUpperCase();
-return super.convertValue(transformedValue, type);
+return super.convertValue(value.replaceAll(\\W, 
_).toUpperCase(), type);
 }
 }
 
diff --git 
a/jbehave-core/src/test/java/org/jbehave/core/steps/ParameterConvertersBehaviour.java
 
b/jbehave-core/src/test/java/org/jbehave/core/steps/ParameterConvertersBehaviour.java
index 8ddb0f2..3e16a5a 100755
--- 
a/jbehave-core/src/test/java/org/jbehave/core/steps/ParameterConvertersBehaviour.java
+++ 
b/jbehave-core/src/test/java/org/jbehave/core/steps/ParameterConvertersBehaviour.java
@@ -40,11 +40,9 @@ import org.jbehave.core.steps.SomeSteps.MyParameters;
 import org.junit.Test;
 
 import static org.hamcrest.MatcherAssert.assertThat;
-
 import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.instanceOf;
 import static org.hamcrest.Matchers.is;
-
 import static org.junit.Assert.fail;
 import static org.mockito.Mockito.mock;
 
@@ -64,7 +62,7 @@ public class ParameterConvertersBehaviour {
 }
 
 private void assertThatDefaultConvertersInclude(ParameterConverter[] 
defaultConverters,
-Class? extends ParameterConverter... converterTypes) {
+@SuppressWarnings(unchecked) Class? extends 
ParameterConverter... converterTypes) {
 for (Class? extends ParameterConverter type : converterTypes) {
 boolean found = false;
 for (ParameterConverter converter : defaultConverters) {
@@ -461,7 +459,7 @@ public class ParameterConvertersBehaviour {
 }
 
 @Test
-public void flexibleEnumConverter_givenLowercasedSpaceSeparatedValue() {
+public void shouldConvertEnumFluently() {
 ParameterConverter converter = new FluentEnumConverter();
 assertThat(converter.accept(SomeEnum.class), equalTo(true));
 assertThat((SomeEnum) converter.convertValue(multiple words and 1 
number, SomeEnum.class), equalTo(SomeEnum.MULTIPLE_WORDS_AND_1_NUMBER));





[jbehave-scm] [scm-core/jbehave-4.x][1/2] JBEHAVE-1075: add FluentEnumConverter

2015-04-08 Thread Alberto Scotto
commit 8b49e0ab364507cf3521b142042b7fd3f8b3adf0
Author: Alberto Scotto scotto.alberto...@gmail.com
AuthorDate: Sun, 22 Mar 2015 12:44:41 +
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Wed, 8 Apr 2015 19:30:59 +0100

JBEHAVE-1075: add FluentEnumConverter

..an EnumConverter able to convert lower-cased, space-separated values to
enum constants.
Before performing the actual conversion, it transforms values to upper-case,
with any non-alphanumeric character replaced by an underscore ('_').

diff --git 
a/jbehave-core/src/main/java/org/jbehave/core/steps/ParameterConverters.java 
b/jbehave-core/src/main/java/org/jbehave/core/steps/ParameterConverters.java
index 28be319..e1d1122 100755
--- a/jbehave-core/src/main/java/org/jbehave/core/steps/ParameterConverters.java
+++ b/jbehave-core/src/main/java/org/jbehave/core/steps/ParameterConverters.java
@@ -576,6 +576,37 @@ public class ParameterConverters {
 }
 
 /**
+ * An {@link EnumConverter} allowing stories prose to be more natural.
+ * Before performing the actual conversion, it transforms values to 
upper-case,
+ * with any non-alphanumeric character replaced by an underscore ('_').
+ * p
+ * bExample/b:
+ * assuming we have defined the step {@code Given I am on the $page}
+ * which is mapped to the method {@code iAmOnPage(PageEnum page)},
+ * we can then write in a scenario:
+ * pre{@code
+ * Given I am on the login page
+ * }/pre
+ * instead of:
+ * pre{@code
+ * Given I am on the LOGIN_PAGE
+ * }/pre
+ * p
+ * bWarning/b. This irequires/i enum constants to follow the
+ * a 
href=https://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s5.2.4-constant-names;
+ * standard conventions for constant names/a, i.e. all uppercase letters,
+ * with words separated by underscores.
+ */
+public static class FluentEnumConverter extends EnumConverter {
+
+@Override
+public Object convertValue(String value, Type type) {
+String transformedValue = value.replaceAll(\\W, 
_).toUpperCase();
+return super.convertValue(transformedValue, type);
+}
+}
+
+/**
  * Parses value to list of the same {@link Enum}, using an injectable value
  * separator (defaults to ,) and trimming each element of the list.
  */
diff --git 
a/jbehave-core/src/test/java/org/jbehave/core/steps/ParameterConvertersBehaviour.java
 
b/jbehave-core/src/test/java/org/jbehave/core/steps/ParameterConvertersBehaviour.java
index 872c1a2..8ddb0f2 100755
--- 
a/jbehave-core/src/test/java/org/jbehave/core/steps/ParameterConvertersBehaviour.java
+++ 
b/jbehave-core/src/test/java/org/jbehave/core/steps/ParameterConvertersBehaviour.java
@@ -29,6 +29,7 @@ import 
org.jbehave.core.steps.ParameterConverters.EnumConverter;
 import org.jbehave.core.steps.ParameterConverters.EnumListConverter;
 import org.jbehave.core.steps.ParameterConverters.ExamplesTableConverter;
 import 
org.jbehave.core.steps.ParameterConverters.ExamplesTableParametersConverter;
+import org.jbehave.core.steps.ParameterConverters.FluentEnumConverter;
 import org.jbehave.core.steps.ParameterConverters.MethodReturningConverter;
 import org.jbehave.core.steps.ParameterConverters.NumberConverter;
 import org.jbehave.core.steps.ParameterConverters.NumberListConverter;
@@ -459,6 +460,13 @@ public class ParameterConvertersBehaviour {
 assertThat((SomeEnum) converter.convertValue(ONE, type), 
equalTo(SomeEnum.ONE));
 }
 
+@Test
+public void flexibleEnumConverter_givenLowercasedSpaceSeparatedValue() {
+ParameterConverter converter = new FluentEnumConverter();
+assertThat(converter.accept(SomeEnum.class), equalTo(true));
+assertThat((SomeEnum) converter.convertValue(multiple words and 1 
number, SomeEnum.class), equalTo(SomeEnum.MULTIPLE_WORDS_AND_1_NUMBER));
+}
+
 
 @Test(expected = ParameterConvertionFailed.class)
 public void shouldFailToConvertEnumForValueNotDefined() throws 
IntrospectionException {
diff --git a/jbehave-core/src/test/java/org/jbehave/core/steps/SomeSteps.java 
b/jbehave-core/src/test/java/org/jbehave/core/steps/SomeSteps.java
index 018a40c..b2c07aa 100755
--- a/jbehave-core/src/test/java/org/jbehave/core/steps/SomeSteps.java
+++ b/jbehave-core/src/test/java/org/jbehave/core/steps/SomeSteps.java
@@ -169,5 +169,7 @@ public class SomeSteps extends Steps {
 enum SomeEnum {
 ONE,
 TWO,
-THREE;
+THREE,
+MULTIPLE_WORDS_AND_1_NUMBER,
+;
 }





[jbehave-dev] [jira] (JBEHAVE-1075) Add FluentEnumConverter, able to convert lower-cased, space-separated values to Enums

2015-04-08 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi resolved an issue as Fixed



















Pulled with thanks









 JBehave /  JBEHAVE-1075



  Add FluentEnumConverter, able to convert lower-cased, space-separated values to Enums 










Change By:

 Mauro Talevi




Resolution:

 Fixed




Fix Version/s:

 3.10




Status:

 Open Resolved












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1074) Writing stories in plain English, with words convertible to boolean

2015-04-08 Thread Alberto Scotto (JIRA)
Title: Message Title










 

 Alberto Scotto created an issue


















 JBehave /  JBEHAVE-1074



  Writing stories in plain English, with words convertible to boolean  










Issue Type:

  New Feature




Assignee:


 Unassigned




Components:


 Core




Created:


 08/Apr/15 10:36 AM




Priority:

  Major




Reporter:

 Alberto Scotto










Provide an enum to allow story writers to write natural prose, while developers can enjoy getting booleans for free.
Quoting from the javadoc..
Example of use. Given the following candidate step:



 @Given(a stock of symbol $symbol $withThreshold a threshold)
 public void aStock(String symbol, BooleanWord withThreshold) {
 stock = new Stock(symbol).withThreshold(withThreshold.toBoolean());
 }



.. it is then possible to write the following scenarios:



 Scenario: a stock with threshold
 
 Given a stock of symbol AAA with a threshold
 When ..
 Then ..
 
 Scenario: a stock with no threshold
 
 Given a stock of symbol AAA without a threshold
 When ..
 Then ..



Please note that this depends on #77.
It would be nice if we could find an elegant way to internationalise the enum constants. One 

[jbehave-dev] [jira] (JBEHAVE-1075) Add FlexibleEnumConverter, able to convert lower-cased, space-separated values to Enums

2015-04-08 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: Add FlexibleEnumConverter, able to convert lower-cased, space-separated values to Enums 










I think FluentEnumConverter would be a more suitable name. 












   

 Add Comment

























 JBehave /  JBEHAVE-1075



  Add FlexibleEnumConverter, able to convert lower-cased, space-separated values to Enums 







 Copyingpasting from the javadoc:   An EnumConverter allowing stories prose to be more natural. Before performing the actual conversion, it transforms values to upper-case, with any non-alphanumeric character replaced by an underscore ('_').   Example: assuming we have defined the step Given I am on the $page which is mapped to the method iAmOnPage(Pa...















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1075) Add FlexibleEnumConverter, able to convert lower-cased, space-separated values to Enums

2015-04-08 Thread Alberto Scotto (JIRA)
Title: Message Title










 

 Alberto Scotto commented on an issue


















  Re: Add FlexibleEnumConverter, able to convert lower-cased, space-separated values to Enums 










Nice, agreed. Thanks












   

 Add Comment

























 JBehave /  JBEHAVE-1075



  Add FlexibleEnumConverter, able to convert lower-cased, space-separated values to Enums 







 Copyingpasting from the javadoc:   An EnumConverter allowing stories prose to be more natural. Before performing the actual conversion, it transforms values to upper-case, with any non-alphanumeric character replaced by an underscore ('_').   Example: assuming we have defined the step Given I am on the $page which is mapped to the method iAmOnPage(Pa...















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1074) Writing stories in plain English, with words convertible to boolean

2015-04-08 Thread Alberto Scotto (JIRA)
Title: Message Title










 

 Alberto Scotto updated an issue


















 JBehave /  JBEHAVE-1074



  Writing stories in plain English, with words convertible to boolean  










Change By:

 Alberto Scotto









 Provideanenumtoallowstorywriterstowritenaturalprose,whiledeveloperscanenjoygettingbooleansforfree.Quotingfromthejavadoc..Exampleofuse.Giventhefollowingcandidatestep:{code}@Given(astockofsymbol$symbol$withThresholdathreshold)publicvoidaStock(Stringsymbol,BooleanWordwithThreshold){stock=newStock(symbol).withThreshold(withThreshold.toBoolean());}{code}..itisthenpossibletowritethefollowingscenarios:{code}Scenario:astockwiththresholdGivenastockofsymbolAAAwithathresholdWhen..Then..Scenario:astockwithnothresholdGivenastockofsymbolAAAwithoutathresholdWhen..Then..{code}Pleasenotethatthisdependson #77 JBEHAVE-1075 .Itwouldbeniceifwecouldfindanelegantwaytointernationalisetheenumconstants.Onewherethereisonlyoneenumconstantforeachbooleanword,andthetranslationsarekeptinanexternalfile.Anyideas?












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1075) Add FlexibleEnumConverter, able to convert lower-cased, space-separated values to Enums

2015-04-08 Thread Alberto Scotto (JIRA)
Title: Message Title










 

 Alberto Scotto commented on an issue


















  Re: Add FlexibleEnumConverter, able to convert lower-cased, space-separated values to Enums 










https://github.com/jbehave/jbehave-core/pull/77/












   

 Add Comment

























 JBehave /  JBEHAVE-1075



  Add FlexibleEnumConverter, able to convert lower-cased, space-separated values to Enums 







 Copyingpasting from the javadoc:   An EnumConverter allowing stories prose to be more natural. Before performing the actual conversion, it transforms values to upper-case, with any non-alphanumeric character replaced by an underscore ('_').   Example: assuming we have defined the step Given I am on the $page which is mapped to the method iAmOnPage(Pa...















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1074) Writing stories in plain English, with words convertible to boolean

2015-04-08 Thread Alberto Scotto (JIRA)
Title: Message Title










 

 Alberto Scotto commented on an issue


















  Re: Writing stories in plain English, with words convertible to boolean  










https://github.com/jbehave/jbehave-core/pull/79












   

 Add Comment

























 JBehave /  JBEHAVE-1074



  Writing stories in plain English, with words convertible to boolean  







 Provide an enum to allow story writers to write natural prose, while developers can enjoy getting booleans for free.   Quoting from the javadoc..   Example of use. Given the following candidate step:   {code}  @Given(a stock of symbol $symbol $withThreshold a threshold)  public void aStock(String symbol, BooleanWord withThreshold) {  stock =...















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email