Skip to content

Commit

Permalink
verify other file objects don't have streamingUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
krwong committed May 10, 2024
1 parent 97a7890 commit 1446a5b
Showing 1 changed file with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1398,20 +1398,27 @@ public void generateSipsWithStreamingUrl() throws Exception {

Resource workResc1 = testHelper.getResourceByCreateTime(depBagChildren, "2005-11-23");
testHelper.assertObjectPopulatedInSip(workResc1, dirManager, model, stagingLocs.get(0), null, "25");
assertFalse(workResc1.hasProperty(streamingUrl, "https://durastream.lib.unc.edu/player?" +
Bag workResc1Bag = model.getBag(workResc1);
List<RDFNode> workResc1Children = workResc1Bag.iterator().toList();
assertEquals(1, workResc1Children.size());
Resource workResc1FileObj = workResc1Children.get(0).asResource();
assertFalse(workResc1FileObj.hasProperty(streamingUrl, "https://durastream.lib.unc.edu/player?" +
"spaceId=open-hls&filename=gilmer_recording-playlist.m3u8"));
Resource workResc2 = testHelper.getResourceByCreateTime(depBagChildren, "2005-11-24");
testHelper.assertObjectPopulatedInSip(workResc2, dirManager, model, stagingLocs.get(1), null, "26");
assertFalse(workResc2.hasProperty(streamingUrl, "https://durastream.lib.unc.edu/player?" +
Bag workResc2Bag = model.getBag(workResc2);
List<RDFNode> workResc2Children = workResc2Bag.iterator().toList();
assertEquals(1, workResc2Children.size());
Resource workResc2FileObj = workResc2Children.get(0).asResource();
assertFalse(workResc2FileObj.hasProperty(streamingUrl, "https://durastream.lib.unc.edu/player?" +
"spaceId=open-hls&filename=gilmer_recording-playlist.m3u8"));
Resource workResc3 = testHelper.getResourceByCreateTime(depBagChildren, "2005-12-08");
testHelper.assertObjectPopulatedInSip(workResc3, dirManager, model, stagingLocs.get(2), null, "27");
// assert file in workResc3 has streamingUrl
Bag workResc3Bag = model.getBag(workResc3);
List<RDFNode> workChildren = workResc3Bag.iterator().toList();
assertEquals(1, workChildren.size());
Resource fileObjResc = workChildren.get(0).asResource();
assertTrue(fileObjResc.hasProperty(streamingUrl, "https://durastream.lib.unc.edu/player?" +
List<RDFNode> workResc3Children = workResc3Bag.iterator().toList();
assertEquals(1, workResc3Children.size());
Resource workResc3FileObj = workResc3Children.get(0).asResource();
assertTrue(workResc3FileObj.hasProperty(streamingUrl, "https://durastream.lib.unc.edu/player?" +
"spaceId=open-hls&filename=gilmer_recording-playlist.m3u8"));

assertPersistedSipInfoMatches(sip);
Expand Down

0 comments on commit 1446a5b

Please sign in to comment.