@@ -20,7 +20,7 @@ public class GroovySnippetTest {
20
20
@ Test
21
21
public void generatesPlainSnippet () {
22
22
String expected = "" +
23
- "Given(~\" ^I have (\\ d+) cukes in my \\ \ " ([^\\ \ " ]*)\\ \ " belly$\" ) { int arg1, String arg2 ->\n " +
23
+ "Given(~' ^I have (\\ d+) cukes in my \" ([^\" ]*)\" belly$' ) { int arg1, String arg2 ->\n " +
24
24
" // Express the Regexp above with the code you wish you had\n " +
25
25
" throw new PendingException()\n " +
26
26
"}\n " ;
@@ -30,7 +30,7 @@ public void generatesPlainSnippet() {
30
30
@ Test
31
31
public void generatesCopyPasteReadyStepSnippetForNumberParameters () throws Exception {
32
32
String expected = "" +
33
- "Given(~\" ^before (\\ d+) after$\" ) { int arg1 ->\n " +
33
+ "Given(~' ^before (\\ d+) after$' ) { int arg1 ->\n " +
34
34
" // Express the Regexp above with the code you wish you had\n " +
35
35
" throw new PendingException()\n " +
36
36
"}\n " ;
@@ -41,7 +41,7 @@ public void generatesCopyPasteReadyStepSnippetForNumberParameters() throws Excep
41
41
@ Test
42
42
public void generatesCopyPasteReadySnippetWhenStepHasIllegalJavaIdentifierChars () {
43
43
String expected = "" +
44
- "Given(~\" ^I have (\\ d+) cukes in: my \\ \ " ([^\\ \ " ]*)\\ \ " red-belly!$\" ) { int arg1, String arg2 ->\n " +
44
+ "Given(~' ^I have (\\ d+) cukes in: my \" ([^\" ]*)\" red-belly!$' ) { int arg1, String arg2 ->\n " +
45
45
" // Express the Regexp above with the code you wish you had\n " +
46
46
" throw new PendingException()\n " +
47
47
"}\n " ;
@@ -52,7 +52,7 @@ public void generatesCopyPasteReadySnippetWhenStepHasIllegalJavaIdentifierChars(
52
52
@ Test
53
53
public void generatesCopyPasteReadySnippetWhenStepHasIntegersInsideStringParameter () {
54
54
String expected = "" +
55
- "Given(~\" ^the DI system receives a message saying \\ \ " ([^\\ \ " ]*)\\ \" $ \" ) { String arg1 ->\n " +
55
+ "Given(~' ^the DI system receives a message saying \" ([^\" ]*)\" $' ) { String arg1 ->\n " +
56
56
" // Express the Regexp above with the code you wish you had\n " +
57
57
" throw new PendingException()\n " +
58
58
"}\n " ;
@@ -62,7 +62,7 @@ public void generatesCopyPasteReadySnippetWhenStepHasIntegersInsideStringParamet
62
62
@ Test
63
63
public void generatesSnippetWithEscapedDollarSigns () {
64
64
String expected = "" +
65
- "Given(~\" ^I have \\ $(\\ d+)$\" ) { int arg1 ->\n " +
65
+ "Given(~' ^I have \\ $(\\ d+)$' ) { int arg1 ->\n " +
66
66
" // Express the Regexp above with the code you wish you had\n " +
67
67
" throw new PendingException()\n " +
68
68
"}\n " ;
@@ -72,7 +72,7 @@ public void generatesSnippetWithEscapedDollarSigns() {
72
72
@ Test
73
73
public void generatesSnippetWithEscapedParentheses () {
74
74
String expected = "" +
75
- "Given(~\" ^I have (\\ d+) cukes \\ (maybe more\\ )$\" ) { int arg1 ->\n " +
75
+ "Given(~' ^I have (\\ d+) cukes \\ (maybe more\\ )$' ) { int arg1 ->\n " +
76
76
" // Express the Regexp above with the code you wish you had\n " +
77
77
" throw new PendingException()\n " +
78
78
"}\n " ;
@@ -82,7 +82,7 @@ public void generatesSnippetWithEscapedParentheses() {
82
82
@ Test
83
83
public void generatesSnippetWithEscapedBrackets () {
84
84
String expected = "" +
85
- "Given(~\" ^I have (\\ d+) cukes \\ [maybe more\\ ]$\" ) { int arg1 ->\n " +
85
+ "Given(~' ^I have (\\ d+) cukes \\ [maybe more\\ ]$' ) { int arg1 ->\n " +
86
86
" // Express the Regexp above with the code you wish you had\n " +
87
87
" throw new PendingException()\n " +
88
88
"}\n " ;
@@ -92,7 +92,7 @@ public void generatesSnippetWithEscapedBrackets() {
92
92
@ Test
93
93
public void generatesSnippetWithDocString () {
94
94
String expected = "" +
95
- "Given(~\" ^I have:$\" ) { String arg1 ->\n " +
95
+ "Given(~' ^I have:$' ) { String arg1 ->\n " +
96
96
" // Express the Regexp above with the code you wish you had\n " +
97
97
" throw new PendingException()\n " +
98
98
"}\n " ;
@@ -102,7 +102,7 @@ public void generatesSnippetWithDocString() {
102
102
@ Test
103
103
public void generatesSnippetWithDataTable () {
104
104
String expected = "" +
105
- "Given(~\" ^I have:$\" ) { DataTable arg1 ->\n " +
105
+ "Given(~' ^I have:$' ) { DataTable arg1 ->\n " +
106
106
" // Express the Regexp above with the code you wish you had\n " +
107
107
" throw new PendingException()\n " +
108
108
"}\n " ;
@@ -124,4 +124,4 @@ private String snippetForDataTable(String name, List<DataTableRow> dataTable) {
124
124
Step step = new Step (NO_COMMENTS , "Given " , name , 0 , dataTable , null );
125
125
return new SnippetGenerator (new GroovySnippet ()).getSnippet (step );
126
126
}
127
- }
127
+ }
0 commit comments