Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Commit 38b1d79

Browse files
committed
Convertion test added for known turtle difficulties
1 parent 5f0b932 commit 38b1d79

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

corese-command/src/test/java/fr/inria/corese/command/programs/ConvertTest.java

+16
Original file line numberDiff line numberDiff line change
@@ -775,4 +775,20 @@ public void testGraphUtilsLoadWithInvalidFormat() {
775775
}
776776
}
777777

778+
@Test
779+
public void testConvertDifficultTurtleToJsonld() {
780+
String pathInputBeatlesTTL = Paths.get(inputPath, "knownDifficultiesInTurtle.ttl").toString();
781+
String pathRefBeatlesJSON = Paths.get(referencesPath, "ttl.knownDifficultiesInTurtle.jsonld").toString();
782+
String pathOutBeatlesJSON = Paths.get(resultPath, "ttl.knownDifficultiesInTurtle.jsonld").toString();
783+
784+
int exitCode = cmd.execute("-i", pathInputBeatlesTTL, "-of", "JSONLD", "-o", pathOutBeatlesJSON);
785+
786+
assertEquals(0, exitCode);
787+
assertEquals(out.toString(), "");
788+
assertEquals(err.toString(), "");
789+
assertEquals(canonicalize(pathRefBeatlesJSON), canonicalize(pathOutBeatlesJSON));
790+
assertNotEquals("", pathOutBeatlesJSON);
791+
792+
}
793+
778794
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@prefix dc: <http://purl.org/dc/elements/1.1/> .
2+
@prefix orcid: <http://orcid.org/> .
3+
@prefix ex: <http://example.com/> .
4+
5+
ex:1 ex:property ex:%3CspanStyle .
6+
7+
ex: dc:contributor orcid:0000-0001-6938-0820 ;
8+
dc:contributor orcid:0000-0002-0643-3144 ;
9+
dc:contributor orcid:0000-0002-5711-4872 .
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[
2+
{
3+
"@id": "http://example.org",
4+
"http://purl.org/dc/elements/1.1/contributor": [
5+
{
6+
"@id": "http://orcid.org/0000-0001-6938-0820"
7+
},
8+
{
9+
"@id": "http://orcid.org/0000-0002-0643-3144"
10+
},
11+
{
12+
"@id": "http://orcid.org/0000-0002-5711-4872"
13+
}
14+
]
15+
},
16+
{
17+
"@id": "http://example.com/1",
18+
"http://example.com/property": [
19+
{
20+
"@id": "http://example.com/%3CspanStyle"
21+
}
22+
]
23+
}
24+
]

0 commit comments

Comments
 (0)