Update CachingDocumentLoaderTests.java

This commit is contained in:
Markus Gylling 2022-07-05 23:50:26 +02:00
parent ebcd653fae
commit 1d051a41b1

View File

@ -13,7 +13,7 @@ import com.google.common.io.Resources;
public class CachingDocumentLoaderTests { public class CachingDocumentLoaderTests {
@Test @Test
void testStaticCachedDocument() { void testStaticCachedDocumentURI() {
Assertions.assertDoesNotThrow(()->{ Assertions.assertDoesNotThrow(()->{
DocumentLoader loader = new CachingDocumentLoader(); DocumentLoader loader = new CachingDocumentLoader();
URI uri = Resources.getResource("contexts/did-v1.jsonld").toURI(); URI uri = Resources.getResource("contexts/did-v1.jsonld").toURI();
@ -21,4 +21,16 @@ public class CachingDocumentLoaderTests {
Assertions.assertNotNull(doc); 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);
});
}
} }