Beispiel #1
0
  private static void doAssertContentFolders(
      ContentEntry e, final List<? extends ContentFolder> folders, String... expected) {
    List<String> actual = new ArrayList<String>();
    for (ContentFolder f : folders) {
      String rootUrl = e.getUrl();
      String folderUrl = f.getUrl();

      if (folderUrl.startsWith(rootUrl)) {
        int length = rootUrl.length() + 1;
        folderUrl = folderUrl.substring(Math.min(length, folderUrl.length()));
      }

      actual.add(folderUrl);
    }

    assertOrderedElementsAreEqual(actual, Arrays.asList(expected));
  }
 public synchronized boolean equals(java.lang.Object obj) {
   if (!(obj instanceof ContentFolder)) return false;
   ContentFolder other = (ContentFolder) obj;
   if (obj == null) return false;
   if (this == obj) return true;
   if (__equalsCalc != null) {
     return (__equalsCalc == obj);
   }
   __equalsCalc = obj;
   boolean _equals;
   _equals =
       super.equals(obj)
           && ((this.contentFolderLinks == null && other.getContentFolderLinks() == null)
               || (this.contentFolderLinks != null
                   && this.contentFolderLinks.equals(other.getContentFolderLinks())))
           && ((this.createdBy == null && other.getCreatedBy() == null)
               || (this.createdBy != null && this.createdBy.equals(other.getCreatedBy())))
           && ((this.createdById == null && other.getCreatedById() == null)
               || (this.createdById != null && this.createdById.equals(other.getCreatedById())))
           && ((this.createdDate == null && other.getCreatedDate() == null)
               || (this.createdDate != null && this.createdDate.equals(other.getCreatedDate())))
           && ((this.isDeleted == null && other.getIsDeleted() == null)
               || (this.isDeleted != null && this.isDeleted.equals(other.getIsDeleted())))
           && ((this.lastModifiedBy == null && other.getLastModifiedBy() == null)
               || (this.lastModifiedBy != null
                   && this.lastModifiedBy.equals(other.getLastModifiedBy())))
           && ((this.lastModifiedById == null && other.getLastModifiedById() == null)
               || (this.lastModifiedById != null
                   && this.lastModifiedById.equals(other.getLastModifiedById())))
           && ((this.lastModifiedDate == null && other.getLastModifiedDate() == null)
               || (this.lastModifiedDate != null
                   && this.lastModifiedDate.equals(other.getLastModifiedDate())))
           && ((this.name == null && other.getName() == null)
               || (this.name != null && this.name.equals(other.getName())))
           && ((this.parentContentFolder == null && other.getParentContentFolder() == null)
               || (this.parentContentFolder != null
                   && this.parentContentFolder.equals(other.getParentContentFolder())))
           && ((this.parentContentFolderId == null && other.getParentContentFolderId() == null)
               || (this.parentContentFolderId != null
                   && this.parentContentFolderId.equals(other.getParentContentFolderId())))
           && ((this.systemModstamp == null && other.getSystemModstamp() == null)
               || (this.systemModstamp != null
                   && this.systemModstamp.equals(other.getSystemModstamp())))
           && ((this.userRecordAccess == null && other.getUserRecordAccess() == null)
               || (this.userRecordAccess != null
                   && this.userRecordAccess.equals(other.getUserRecordAccess())));
   __equalsCalc = null;
   return _equals;
 }