コード例 #1
0
 private void assertRendition(CMISRendition receivedRendition, CMISRendition expectedRendition) {
   assertEquals(expectedRendition.getStreamId(), receivedRendition.getStreamId());
   assertEquals(expectedRendition.getKind(), receivedRendition.getKind());
   assertEquals(expectedRendition.getMimeType(), receivedRendition.getMimeType());
   assertEquals(expectedRendition.getWidth(), receivedRendition.getWidth());
   assertEquals(expectedRendition.getHeight(), receivedRendition.getHeight());
 }
コード例 #2
0
  private void assertRendiions(
      List<CMISRendition> receivedRenditions, List<CMISRendition> expectedRenditions) {
    assertNotNull(receivedRenditions);
    expectedRenditions = removeReplication(expectedRenditions);
    assertTrue(receivedRenditions.size() == expectedRenditions.size());

    for (CMISRendition rendition : receivedRenditions) {
      assertNotNull(rendition);
      assertNotNull(rendition.getStreamId());
    }

    Collections.sort(receivedRenditions, renditionsComparator);
    Collections.sort(expectedRenditions, renditionsComparator);

    for (int i = 0; i < expectedRenditions.size(); ++i) {
      assertRendition(receivedRenditions.get(i), expectedRenditions.get(i));
    }
  }
コード例 #3
0
 public int compare(CMISRendition rendition1, CMISRendition rendition2) {
   return rendition1.getStreamId().compareTo(rendition2.getStreamId());
 }