Feed extends FeedFile implements ImageResource { public void updateFromOther(Feed other) { if (other.imageUrl != null) { this.imageUrl = other.imageUrl; } if (other.feedTitle != null) { feedTitle = other.feedTitle; } if (other.feedIdentifier != null) { feedIdentifier = other.feedIdentifier; } if (other.link != null) { link = other.link; } if (other.description != null) { description = other.description; } if (other.language != null) { language = other.language; } if (other.author != null) { author = other.author; } if (other.paymentLink != null) { paymentLink = other.paymentLink; } if (!this.paged && other.paged) { this.paged = other.paged; this.nextPageLink = other.nextPageLink; } } Feed(long id, String lastUpdate, String title, String customTitle, String link, String description, String paymentLink,
                String author, String language, String type, String feedIdentifier, String imageUrl, String fileUrl,
                String downloadUrl, boolean downloaded, boolean paged, String nextPageLink,
                String filter, @Nullable SortOrder sortOrder, boolean lastUpdateFailed);  Feed(long id, String lastUpdate, String title, String link, String description, String paymentLink,
                String author, String language, String type, String feedIdentifier, String imageUrl, String fileUrl,
                String downloadUrl, boolean downloaded);  Feed();  Feed(String url, String lastUpdate);  Feed(String url, String lastUpdate, String title);  Feed(String url, String lastUpdate, String title, String username, String password); static Feed fromCursor(Cursor cursor); FeedItem getItemAtIndex(int position); String getIdentifyingValue(); @Override String getHumanReadableIdentifier(); void updateFromOther(Feed other); boolean compareWithOther(Feed other); FeedItem getMostRecentItem(); @Override int getTypeAsInt(); String getTitle(); void setTitle(String title); String getFeedTitle(); @Nullable String getCustomTitle(); void setCustomTitle(String customTitle); String getLink(); void setLink(String link); String getDescription(); void setDescription(String description); String getImageUrl(); void setImageUrl(String imageUrl); List<FeedItem> getItems(); void setItems(List<FeedItem> list); String getLastUpdate(); void setLastUpdate(String lastModified); String getFeedIdentifier(); void setFeedIdentifier(String feedIdentifier); String getPaymentLink(); void setPaymentLink(String paymentLink); String getLanguage(); void setLanguage(String language); String getAuthor(); void setAuthor(String author); String getType(); void setType(String type); void setPreferences(FeedPreferences preferences); FeedPreferences getPreferences(); void savePreferences(); @Override void setId(long id); @Override String getImageLocation(); int getPageNr(); void setPageNr(int pageNr); boolean isPaged(); void setPaged(boolean paged); String getNextPageLink(); void setNextPageLink(String nextPageLink); @Nullable FeedItemFilter getItemFilter(); void setItemFilter(String[] properties); @Nullable SortOrder getSortOrder(); void setSortOrder(@Nullable SortOrder sortOrder); boolean hasLastUpdateFailed(); void setLastUpdateFailed(boolean lastUpdateFailed); static final int FEEDFILETYPE_FEED; static final String TYPE_RSS2; static final String TYPE_ATOM1; }
@Test public void testUpdateFromOther_feedImageDownloadUrlChanged() throws Exception { setNewFeedImageDownloadUrl(); original.updateFromOther(changedFeed); feedImageWasUpdated(); }
@Test public void testUpdateFromOther_feedImageRemoved() throws Exception { feedImageRemoved(); original.updateFromOther(changedFeed); feedImageWasNotUpdated(); }
@Test public void testUpdateFromOther_feedImageAdded() throws Exception { feedHadNoImage(); setNewFeedImageDownloadUrl(); original.updateFromOther(changedFeed); feedImageWasUpdated(); }