Skip to content

Commit d0f31b3

Browse files
authored
Java: Enabled csvSourceWithDelimiterUsingTextblock
1 parent e386576 commit d0f31b3

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

java/src/test/java/org/sammancoaching/parameterizedtests/concept/ParameterizedTests.java

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -109,18 +109,17 @@ void csvSourceWithDelimiterFormatedAndIncludingWhitespaces(String input, String
109109
assertEquals(expected, actualValue);
110110
}
111111

112-
// // JDK15+
113-
// @CsvSource(delimiter = '|', textBlock = """
114-
// test | TEST
115-
// tEst | TEST
116-
// Java | JAVA
117-
// loNGER sTriNg | LONGER STRING
118-
// """)
119-
// void csvSourceWithDelimiterUsingTextblock(String input, String expected) {
120-
// // let's consider String#toUpperCase to be the code to test
121-
// String actualValue = input.toUpperCase();
122-
// assertEquals(expected, actualValue);
123-
// }
112+
@CsvSource(textBlock = """
113+
test | TEST
114+
tEst | TEST
115+
Java | JAVA
116+
loNGER sTriNg | LONGER STRING
117+
""", delimiter = '|')
118+
void csvSourceWithDelimiterUsingTextblock(String input, String expected) {
119+
// let's consider String#toUpperCase to be the code to test
120+
String actualValue = input.toUpperCase();
121+
assertEquals(expected, actualValue);
122+
}
124123

125124
@ParameterizedTest
126125
// can use files and/or resources

0 commit comments

Comments
 (0)