Skip to content

Commit

Permalink
fix test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorrit Poelen committed Jan 14, 2025
1 parent 290c82f commit ccd3a2b
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,15 +258,16 @@ public boolean supports(IRI key) {
});


String compositeHashIRI = "cut:hash://sha256/b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c!/b1-2";
hashVerifier.on(RefNodeFactory.toStatement(
RefNodeFactory.toIRI("cut:hash://sha256/b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c!/b1-2"),
RefNodeFactory.toIRI(compositeHashIRI),
RefNodeConstants.HAS_VERSION,
RefNodeFactory.toIRI("hash://sha256/9c3aee7110b787f0fb5f81633a36392bd277ea945d44c874a9a23601aefe20cf"))
);

assertThat(new String((outputStream).toByteArray(), StandardCharsets.UTF_8),
Is.is("cut:hash://sha256/b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c!/b1-2\t" +
resourceLocation + "\t" +
Is.is(compositeHashIRI + "\t" +
compositeHashIRI + "\t" +
"OK\t" +
"CONTENT_PRESENT_VALID_HASH\t" +
"2\t" +
Expand Down Expand Up @@ -298,15 +299,16 @@ public boolean supports(IRI key) {
});


String compositeHashIRI = "cut:hash://sha256/b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c!/b1-2";
hashVerifier.on(RefNodeFactory.toStatement(
RefNodeFactory.toIRI("https://api.zotero.org/groups/5435545/items/9CUCQ7BA"),
RefNodeConstants.HAS_VERSION,
RefNodeFactory.toIRI("cut:hash://sha256/b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c!/b1-2"))
);
RefNodeFactory.toIRI(compositeHashIRI))
);

assertThat(new String((outputStream).toByteArray(), StandardCharsets.UTF_8),
Is.is("cut:hash://sha256/b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c!/b1-2\t" +
resourceLocation + "\t" +
Is.is(compositeHashIRI + "\t" +
compositeHashIRI + "\t" +
"OK\t" +
"CONTENT_PRESENT_HASH_OPERATION_SUCCEEDS\t" +
"2\t" +
Expand Down

0 comments on commit ccd3a2b

Please sign in to comment.