• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package com.networknt.schema;
2 
3 import org.junit.jupiter.api.Assertions;
4 import org.junit.jupiter.api.Test;
5 
6 import java.io.InputStream;
7 
8 public class Issue518Test {
9     private static final JsonMetaSchema igluMetaSchema =
10             JsonMetaSchema
11                     .builder("http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", JsonMetaSchema.getV7())
12                     .build();
13 
14     private static final JsonSchemaFactory FACTORY =
15             JsonSchemaFactory
16                     .builder(JsonSchemaFactory.getInstance(SpecVersion.VersionFlag.V7))
17                     .metaSchema(igluMetaSchema)
18                     .build();
19 
20     @Test
testPreservingEmptyFragmentSuffix()21     public void testPreservingEmptyFragmentSuffix() {
22         String schemaPath = "/schema/issue518-v7.json";
23         InputStream schemaInputStream = getClass().getResourceAsStream(schemaPath);
24         JsonSchema schema = FACTORY.getSchema(schemaInputStream);
25 
26         Assertions.assertNotNull(schema);
27     }
28 }
29