Skip to content

Commit f464e2a

Browse files
committed
Add unit tests for conditional schema loading: cases below V7
1 parent 8020475 commit f464e2a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

core/src/test/java/org/everit/json/schema/loader/SchemaLoaderTest.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,18 @@ public void conditionalSchemaIfThenElse() {
174174
Assert.assertTrue(actual.getElseSchema().isPresent());
175175
}
176176

177+
@Test
178+
public void conditionalSchemaLoadingV4() {
179+
Schema actual = SchemaLoader.load(get("conditionalSchemaIf"));
180+
assertFalse(actual instanceof ConditionalSchema);
181+
}
182+
183+
@Test
184+
public void conditionalSchemaLoadingV6() {
185+
Schema actual = loadAsV6(get("conditionalSchemaIf"));
186+
assertFalse(actual instanceof ConditionalSchema);
187+
}
188+
177189
@Test(expected = SchemaException.class)
178190
public void invalidExclusiveMinimum() {
179191
SchemaLoader.load(get("invalidExclusiveMinimum"));

0 commit comments

Comments
 (0)