File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
core/src/test/java/org/everit/json/schema/loader Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 1
1
package org .everit .json .schema .loader ;
2
2
3
3
import static java .util .Arrays .asList ;
4
+ import static org .everit .json .schema .loader .SpecificationVersion .DRAFT_4 ;
4
5
import static org .everit .json .schema .loader .SpecificationVersion .DRAFT_6 ;
6
+ import static org .junit .Assert .assertEquals ;
5
7
import static org .junit .Assert .assertTrue ;
6
8
9
+ import java .util .Map ;
7
10
import java .util .Set ;
8
11
12
+ import org .everit .json .schema .FormatValidator ;
9
13
import org .junit .Test ;
10
14
11
15
public class SpecificationVersionTest {
@@ -15,4 +19,18 @@ public void v6ContainsAdditionalFormats() {
15
19
Set <String > actual = DRAFT_6 .defaultFormatValidators ().keySet ();
16
20
assertTrue (actual .containsAll (asList ("json-pointer" , "uri-reference" , "uri-template" )));
17
21
}
22
+
23
+ @ Test
24
+ public void v4MapMatchesFormatNames () {
25
+ for (Map .Entry <String , FormatValidator > entry : DRAFT_4 .defaultFormatValidators ().entrySet ()) {
26
+ assertEquals (entry .getKey (), entry .getValue ().formatName ());
27
+ }
28
+ }
29
+
30
+ @ Test
31
+ public void v6MapMatchesFormatNames () {
32
+ for (Map .Entry <String , FormatValidator > entry : DRAFT_6 .defaultFormatValidators ().entrySet ()) {
33
+ assertEquals (entry .getKey (), entry .getValue ().formatName ());
34
+ }
35
+ }
18
36
}
You can’t perform that action at this time.
0 commit comments