Skip to content

Commit

Permalink
Convertion test added for known turtle difficulties
Browse files Browse the repository at this point in the history
  • Loading branch information
MaillPierre committed Aug 28, 2024
1 parent 5f0b932 commit 38b1d79
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -775,4 +775,20 @@ public void testGraphUtilsLoadWithInvalidFormat() {
}
}

@Test
public void testConvertDifficultTurtleToJsonld() {
String pathInputBeatlesTTL = Paths.get(inputPath, "knownDifficultiesInTurtle.ttl").toString();
String pathRefBeatlesJSON = Paths.get(referencesPath, "ttl.knownDifficultiesInTurtle.jsonld").toString();
String pathOutBeatlesJSON = Paths.get(resultPath, "ttl.knownDifficultiesInTurtle.jsonld").toString();

int exitCode = cmd.execute("-i", pathInputBeatlesTTL, "-of", "JSONLD", "-o", pathOutBeatlesJSON);

assertEquals(0, exitCode);
assertEquals(out.toString(), "");
assertEquals(err.toString(), "");
assertEquals(canonicalize(pathRefBeatlesJSON), canonicalize(pathOutBeatlesJSON));
assertNotEquals("", pathOutBeatlesJSON);

}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix orcid: <http://orcid.org/> .
@prefix ex: <http://example.com/> .

ex:1 ex:property ex:%3CspanStyle .

ex: dc:contributor orcid:0000-0001-6938-0820 ;
dc:contributor orcid:0000-0002-0643-3144 ;
dc:contributor orcid:0000-0002-5711-4872 .
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[
{
"@id": "http://example.org",
"http://purl.org/dc/elements/1.1/contributor": [
{
"@id": "http://orcid.org/0000-0001-6938-0820"
},
{
"@id": "http://orcid.org/0000-0002-0643-3144"
},
{
"@id": "http://orcid.org/0000-0002-5711-4872"
}
]
},
{
"@id": "http://example.com/1",
"http://example.com/property": [
{
"@id": "http://example.com/%3CspanStyle"
}
]
}
]

0 comments on commit 38b1d79

Please sign in to comment.