11package edu .kit .datamanager .ro_crate .context ;
22
3- import com .fasterxml .jackson .core .JsonProcessingException ;
43import com .fasterxml .jackson .databind .JsonNode ;
54import com .fasterxml .jackson .databind .ObjectMapper ;
65import com .fasterxml .jackson .databind .node .ArrayNode ;
@@ -32,7 +31,6 @@ void initContext() throws IOException {
3231 this .context = new RoCrateMetadataContext ();
3332
3433 final String crateManifestPath = "/crates/extendedContextExample/ro-crate-metadata.json" ;
35- ContextTest .class .getResource (crateManifestPath ).getPath ();
3634 ObjectMapper objectMapper = MyObjectMapper .getMapper ();
3735 JsonNode jsonNode = objectMapper .readTree (ContextTest .class .getResourceAsStream (crateManifestPath ));
3836 this .complexContext = new RoCrateMetadataContext (jsonNode .get ("@context" ));
@@ -147,7 +145,7 @@ void deleteUrlTest() {
147145 }
148146
149147 @ Test
150- void doubledContextUrlsTest () throws JsonProcessingException {
148+ void doubledContextUrlsTest () {
151149 String url = "www.example.com" ;
152150 RoCrateMetadataContext context = new RoCrateMetadataContext ();
153151 assertFalse (context .urls .contains (url ));
@@ -246,7 +244,7 @@ void testSetDeleteGetPair() {
246244 }
247245
248246 @ Test
249- void testReadDeleteGetPair () throws IOException {
247+ void testReadDeleteGetPair () {
250248 String key = "custom" ;
251249 String value = "_:" ;
252250 assertEquals (value , this .complexContext .readValueOf (key ));
@@ -257,7 +255,7 @@ void testReadDeleteGetPair() throws IOException {
257255 }
258256
259257 @ Test
260- void testReadKeys () throws IOException {
258+ void testReadKeys () {
261259 var expected = Set .of ("custom" , "owl" , "datacite" , "xsd" , "rdfs" );
262260 var given = this .complexContext .readKeys ();
263261 for (String key : expected ) {
@@ -266,7 +264,7 @@ void testReadKeys() throws IOException {
266264 }
267265
268266 @ Test
269- void testReadPairs () throws IOException {
267+ void testReadPairs () {
270268 var expected = Set .of ("custom" , "owl" , "datacite" , "xsd" , "rdfs" );
271269 var given = this .complexContext .readPairs ();
272270 var keys = given .keySet ();
0 commit comments