|
1 | 1 | package io.github.pixee.security; |
2 | 2 |
|
3 | | -import static io.github.pixee.security.J8ApiBridge.setOf; |
4 | | -import static org.hamcrest.MatcherAssert.assertThat; |
5 | | -import static org.hamcrest.Matchers.*; |
6 | | -import static org.junit.jupiter.api.Assertions.assertThrows; |
| 3 | +import org.junit.jupiter.api.Test; |
| 4 | +import org.junit.jupiter.params.ParameterizedTest; |
| 5 | +import org.junit.jupiter.params.provider.Arguments; |
| 6 | +import org.junit.jupiter.params.provider.MethodSource; |
7 | 7 |
|
8 | 8 | import java.net.MalformedURLException; |
9 | 9 | import java.net.URL; |
10 | | -import java.util.List; |
11 | 10 | import java.util.regex.Pattern; |
12 | 11 | import java.util.stream.Stream; |
13 | | -import org.junit.jupiter.api.Test; |
14 | | -import org.junit.jupiter.params.ParameterizedTest; |
15 | | -import org.junit.jupiter.params.provider.Arguments; |
16 | | -import org.junit.jupiter.params.provider.MethodSource; |
| 12 | + |
| 13 | +import static io.github.pixee.security.J8ApiBridge.setOf; |
| 14 | +import static org.hamcrest.MatcherAssert.assertThat; |
| 15 | +import static org.hamcrest.Matchers.*; |
| 16 | +import static org.junit.jupiter.api.Assertions.assertThrows; |
17 | 17 |
|
18 | 18 | final class UrlsTest { |
19 | 19 |
|
@@ -146,7 +146,7 @@ void it_disallows_bad_domains() throws MalformedURLException { |
146 | 146 | Urls.create("https://different-sub-123.good.com/", setOf(UrlProtocol.HTTPS), allowsOnlyGoodDotComByDomainString); |
147 | 147 | Urls.create("https://.good.com/", setOf(UrlProtocol.HTTPS), allowsOnlyGoodDotComByDomainString); |
148 | 148 |
|
149 | | - List.of("https://goodAcom/", "https://evil.com", "https://good.com.evil", "https://good.com.").stream().forEach(badDomain -> { |
| 149 | + Stream.of("https://goodAcom/", "https://evil.com", "https://good.com.evil", "https://good.com.").forEach(badDomain -> { |
150 | 150 | assertThrows( |
151 | 151 | SecurityException.class, |
152 | 152 | () -> { |
|
0 commit comments