mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-18 23:43:06 +00:00
Fixed IT.
This commit is contained in:
@@ -94,6 +94,7 @@ public class IIIFRestRepositoryIT extends AbstractControllerIntegrationTest {
|
|||||||
|
|
||||||
String bitstreamContent = "ThisIsSomeDummyText";
|
String bitstreamContent = "ThisIsSomeDummyText";
|
||||||
Bitstream bitstream1 = null;
|
Bitstream bitstream1 = null;
|
||||||
|
Bitstream bitstream2 = null;
|
||||||
try (InputStream is = IOUtils.toInputStream(bitstreamContent, CharEncoding.UTF_8)) {
|
try (InputStream is = IOUtils.toInputStream(bitstreamContent, CharEncoding.UTF_8)) {
|
||||||
bitstream1 = BitstreamBuilder
|
bitstream1 = BitstreamBuilder
|
||||||
.createBitstream(context, publicItem1, is, IIIFBundle)
|
.createBitstream(context, publicItem1, is, IIIFBundle)
|
||||||
@@ -102,6 +103,14 @@ public class IIIFRestRepositoryIT extends AbstractControllerIntegrationTest {
|
|||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try (InputStream is = IOUtils.toInputStream(bitstreamContent, CharEncoding.UTF_8)) {
|
||||||
|
bitstream2 = BitstreamBuilder
|
||||||
|
.createBitstream(context, publicItem1, is, "THUMBNAIL")
|
||||||
|
.withName("Bitstream2")
|
||||||
|
.withMimeType("image/jpeg")
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
context.restoreAuthSystemState();
|
context.restoreAuthSystemState();
|
||||||
|
|
||||||
// Default canvas size and label.
|
// Default canvas size and label.
|
||||||
@@ -110,7 +119,7 @@ public class IIIFRestRepositoryIT extends AbstractControllerIntegrationTest {
|
|||||||
.andExpect(jsonPath("$.@context", is("http://iiif.io/api/presentation/2/context.json")))
|
.andExpect(jsonPath("$.@context", is("http://iiif.io/api/presentation/2/context.json")))
|
||||||
.andExpect(jsonPath("$.service.profile", is("http://iiif.io/api/search/0/search")))
|
.andExpect(jsonPath("$.service.profile", is("http://iiif.io/api/search/0/search")))
|
||||||
.andExpect(jsonPath("$.thumbnail.@id", Matchers.containsString("/iiif/2/"
|
.andExpect(jsonPath("$.thumbnail.@id", Matchers.containsString("/iiif/2/"
|
||||||
+ bitstream1.getID())))
|
+ bitstream2.getID())))
|
||||||
.andExpect(jsonPath("$.sequences[0].canvases[0].@id",
|
.andExpect(jsonPath("$.sequences[0].canvases[0].@id",
|
||||||
Matchers.containsString("/iiif/" + publicItem1.getID() + "/canvas/c0")))
|
Matchers.containsString("/iiif/" + publicItem1.getID() + "/canvas/c0")))
|
||||||
.andExpect(jsonPath("$.sequences[0].canvases[0].label", is("Page 1")))
|
.andExpect(jsonPath("$.sequences[0].canvases[0].label", is("Page 1")))
|
||||||
|
Reference in New Issue
Block a user