Merge branch 'vc-ob-clr' of https://github.com/imsglc/ims-inspector into vc-ob-clr

This commit is contained in:
Miles Lyon
2022-07-06 09:26:55 -04:00
17 changed files with 1407 additions and 23 deletions
@@ -0,0 +1,36 @@
package org.oneedtech.inspect.vc.util;
import java.net.URI;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import com.apicatalog.jsonld.document.Document;
import com.apicatalog.jsonld.loader.DocumentLoader;
import com.apicatalog.jsonld.loader.DocumentLoaderOptions;
import com.google.common.io.Resources;
public class CachingDocumentLoaderTests {
@Test
void testStaticCachedDocumentURI() {
Assertions.assertDoesNotThrow(()->{
DocumentLoader loader = new CachingDocumentLoader();
URI uri = Resources.getResource("contexts/did-v1.jsonld").toURI();
Document doc = loader.loadDocument(uri, new DocumentLoaderOptions());
Assertions.assertNotNull(doc);
});
}
@Test
void testStaticCachedDocumentKey() {
Assertions.assertDoesNotThrow(()->{
DocumentLoader loader = new CachingDocumentLoader();
URI uri = new URI("https://www.w3.org/ns/did/v1");
Document doc = loader.loadDocument(uri, new DocumentLoaderOptions());
Assertions.assertNotNull(doc);
});
}
}