Skip to content

Commit

Permalink
getter for Post->copyHistory
Browse files Browse the repository at this point in the history
  • Loading branch information
disovi committed Feb 16, 2015
1 parent c0a588d commit 8e16656
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Expand Up @@ -89,6 +89,10 @@ public List<? extends Attachment> getAttachments() {
return attachments;
}

public List<Post> getCopyHistory() {
return copyHistory;
}

@Override
public String toString() {
return "Post{" +
Expand Down
Expand Up @@ -17,9 +17,7 @@

import org.junit.Test;
import org.springframework.social.vkontakte.api.Post;
import org.springframework.social.vkontakte.api.attachment.Attachment;
import org.springframework.social.vkontakte.api.attachment.AttachmentType;
import org.springframework.social.vkontakte.api.attachment.PhotosListAttachment;
import org.springframework.social.vkontakte.api.attachment.*;

import java.util.List;
import static org.junit.Assert.assertEquals;
Expand All @@ -46,5 +44,6 @@ public void getPosts() {
assertEquals(306810815, ((PhotosListAttachment)photosListAttachment).getPhotosList().get(0).getPhotoId());
assertEquals(45555, posts.get(1).getId());
assertEquals(2, posts.get(1).getAttachments().size());
assertEquals(3, ((StickerAttachment)posts.get(22).getCopyHistory().get(0).getAttachments().get(0)).getSticker().getProductId());
}
}

0 comments on commit 8e16656

Please sign in to comment.