Skip to content

Commit

Permalink
Add negative test
Browse files Browse the repository at this point in the history
  • Loading branch information
RetGal committed Mar 4, 2024
1 parent 8bc0846 commit 1cb9f4a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/test/java/mpo/dayon/common/utils/SystemUtilitiesTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@ void isValidUrlStringShouldReturnTrueForValidUrls(String url) {
assertTrue(isValidUrl(url));
}

@ParameterizedTest
@CsvSource({"http://127.0.0.", "htt://localhost/token", "https://example.com!/rvs", "file://dayon.example", "sun.fun", "https://\uD83E\uDD84"})
void isValidUrlStringShouldReturnFalseForInvalidUrls(String url) {
// when, then
assertFalse(isValidUrl(url));
}

@Test
void shouldObtainWritableTempDir() throws IOException {
// when, then
Expand Down

0 comments on commit 1cb9f4a

Please sign in to comment.