File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
src/test/java/com/networknt/schema Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ package com .networknt .schema ;
2+
3+ import static org .junit .Assert .assertEquals ;
4+ import org .junit .Test ;
5+
6+ public class ValidatorTypeCodeTest {
7+
8+ @ Test
9+ public void testFromValueString () {
10+ assertEquals (ValidatorTypeCode .ADDITIONAL_PROPERTIES , ValidatorTypeCode .fromValue ("additionalProperties" ));
11+ }
12+
13+ @ Test
14+ public void testFromValueAll () {
15+ for (ValidatorTypeCode code : ValidatorTypeCode .values ()) {
16+ assertEquals (code , ValidatorTypeCode .fromValue (code .getValue ()));
17+ }
18+ }
19+
20+ @ Test (expected = IllegalArgumentException .class )
21+ public void testFromValueMissing () {
22+ assertEquals (ValidatorTypeCode .ADDITIONAL_PROPERTIES , ValidatorTypeCode .fromValue ("missing" ));
23+ }
24+
25+ }
You can’t perform that action at this time.
0 commit comments