Use text blocks with JUnit Jupiter 5.8.1

See gh-27450
This commit is contained in:
Sam Brannen
2021-09-28 14:20:31 +02:00
parent 6337e08f2b
commit 08bce08018
4 changed files with 86 additions and 86 deletions

View File

@@ -48,28 +48,28 @@ class SockJsUrlInfoTests {
}
@ParameterizedTest
@CsvSource( {
"http, http",
"https, https",
"ws, http",
"wss, https",
})
@CsvSource(textBlock = """
http, http
https, https
ws, http
wss, https
""")
void infoUrl(String scheme, String expectedScheme) throws Exception {
SockJsUrlInfo info = new SockJsUrlInfo(new URI(scheme + "://example.com"));
assertThat(info.getInfoUrl()).isEqualTo(new URI(expectedScheme + "://example.com/info"));
}
@ParameterizedTest
@CsvSource( {
"http, http, XHR_STREAMING",
"http, ws, WEBSOCKET",
"https, https, XHR_STREAMING",
"https, wss, WEBSOCKET",
"ws, http, XHR_STREAMING",
"ws, ws, WEBSOCKET",
"wss, https, XHR_STREAMING",
"wss, wss, WEBSOCKET"
})
@CsvSource(textBlock = """
http, http, XHR_STREAMING
http, ws, WEBSOCKET
https, https, XHR_STREAMING
https, wss, WEBSOCKET
ws, http, XHR_STREAMING
ws, ws, WEBSOCKET
wss, https, XHR_STREAMING
wss, wss, WEBSOCKET
""")
void transportUrl(String scheme, String expectedScheme, TransportType transportType) throws Exception {
SockJsUrlInfo info = new SockJsUrlInfo(new URI(scheme + "://example.com"));
String serverId = info.getServerId();