Skip to content

Commit 5bf8380

Browse files
committed
adding unittest to URIV4FormatValidator
1 parent 86c2943 commit 5bf8380

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package org.everit.json.schema.internal;
2+
3+
import static org.junit.Assert.assertFalse;
4+
import static org.junit.Assert.assertTrue;
5+
6+
import org.junit.Test;
7+
8+
public class URIV4FormatValidatorTest {
9+
10+
@Test
11+
public void relativeURI() {
12+
assertFalse(new URIV4FormatValidator().validate("abc").isPresent());
13+
}
14+
15+
@Test
16+
public void absoluteURI() {
17+
assertFalse(new URIV4FormatValidator().validate("http://a.b.c").isPresent());
18+
}
19+
20+
@Test
21+
public void notURI() {
22+
assertTrue(new URIV4FormatValidator().validate("\\\\\\\\WINDOWS\\\\fileshare").isPresent());
23+
}
24+
}

0 commit comments

Comments
 (0)