Skip to content

Commit 5396793

Browse files
committed
112 remove all brackets from test cases
1 parent c220969 commit 5396793

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

3-0-java-core/3-6-3-crazy-regex/src/test/java/com/bobocode/se/CrazyRegexTest.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ void findAllWordsWithFiveLength() {
114114
void findAllLettersAndDigitsWithLengthThree() {
115115
String result = regexChecker(crazyRegex.findAllLettersAndDigitsWithLengthThree(), text);
116116
assertThat(result).isEqualTo("\nThe\nof\nthe\nand\nthe\nnot\nThe\nis\ndon\nyou\nnk\nnk\nThe\nCA\nAK\nPA\n412" +
117-
"\n555\ncom\n412\n555\n412\n555\n646\n555\nof\ncom\nnet\nor\nnyu\nedu\n1Z\naaa\nOf\ncom\ncom\nwww\ncom" +
117+
"\n555\ncom\n412\n555\n412\n555\n646\n555\nof\ncom\nnet\nor\nnyu\nedu\n1Z\naaa\nOf\nwww\ncom\ncom\nwww\ncom" +
118118
"\nis\nis\nam\nnot\nnot\nwhy\nwhy\nam\nok\ncat\ncat\ndog\ndog");
119119
}
120120

@@ -144,25 +144,24 @@ void findAllOpenBraces() {
144144
@Order(16)
145145
void findOnlyResources() {
146146
String result = regexChecker(crazyRegex.findOnlyResources(), text);
147-
assertThat(result).isEqualTo("\n[Google]\n[StackOverflow]\n[Youtube]");
147+
assertThat(result).isEqualTo("\nGoogle\nStackOverflow\nYoutube");
148148
}
149149

150150
@Test
151151
@Order(17)
152152
void findOnlyLinksInNote() {
153153
String result = regexChecker(crazyRegex.findOnlyLinksInNote(), text);
154-
assertThat(result).isEqualTo("\n(https://google.com)\n(https://stackoverflow.com)" +
155-
"\n(https://www.youtube.com)");
154+
assertThat(result).isEqualTo("\nhttps://www.google.com\nhttps://stackoverflow.com\nhttps://www.youtube.com");
156155
}
157156

158157
@Test
159158
@Order(18)
160159
void findOnlyLinksInJson() {
161160
String result = regexChecker(crazyRegex.findOnlyLinksInJson(), json);
162161
assertThat(result).isEqualTo(
163-
"\nhttp://mars.jpl.nasa.gov/msl-raw-images/proj/msl/redops/ods/surface/sol/01000/opgs/edr/fcam/FLB_486265257EDR_F0481570FHAZ00323M_.JPG\",\n" +
164-
"http://mars.jpl.nasa.gov/msl-raw-images/proj/msl/redops/ods/surface/sol/01000/opgs/edr/fcam/FRB_486265257EDR_F0481570FHAZ00323M_.JPG\",\n" +
165-
"http://mars.jpl.nasa.gov/msl-raw-images/proj/msl/redops/ods/surface/sol/01000/opgs/edr/rcam/RLB_486265291EDR_F0481570RHAZ00323M_.JPG\","
162+
"\nhttp://mars.jpl.nasa.gov/msl-raw-images/proj/msl/redops/ods/surface/sol/01000/opgs/edr/fcam/FLB_486265257EDR_F0481570FHAZ00323M_.JPG\n" +
163+
"http://mars.jpl.nasa.gov/msl-raw-images/proj/msl/redops/ods/surface/sol/01000/opgs/edr/fcam/FRB_486265257EDR_F0481570FHAZ00323M_.JPG\n" +
164+
"http://mars.jpl.nasa.gov/msl-raw-images/proj/msl/redops/ods/surface/sol/01000/opgs/edr/rcam/RLB_486265291EDR_F0481570RHAZ00323M_.JPG"
166165
);
167166
}
168167

3-0-java-core/3-6-3-crazy-regex/src/test/resources/note.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ The Collin Richardson CA 01001 AK 03148 PA 02132 (412)555-1212 [email protected]
44
I know email addresses of fascinating people like [email protected] [email protected] or
55
66
1Z aaa **** *** {{{ {{ { Of
7-
[Google](https://google.com)[StackOverflow](https://stackoverflow.com)[Youtube](https://www.youtube.com)
7+
[Google](https://www.google.com)[StackOverflow](https://stackoverflow.com)[Youtube](https://www.youtube.com)
88
This is is some text text with double double words some where I I I am not not sure why why I am typing ok? cat cat dog
99
dog fish fish

0 commit comments

Comments
 (0)