firstAlbum.addImage(thirdImage);
secondAlbum.addImage(secondImage);
memoryDatabase.storeSone(sone);
firstAlbum.addImage(thirdImage);
secondAlbum.addImage(secondImage);
memoryDatabase.storeSone(sone);
isPost(firstPost.getId(), 1000L, "post1",
Optional.<String>absent()));
isPost(firstPost.getId(), 1000L, "post1",
Optional.<String>absent()));
isPost(secondPost.getId(), 2000L, "post2", of(RECIPIENT_ID)));
isPost(secondPost.getId(), 2000L, "post2", of(RECIPIENT_ID)));
assertThat(memoryDatabase.getPostReply("reply1"),
isPostReply("reply1", "post1", 3000L, "reply1"));
assertThat(memoryDatabase.getPostReply("reply2"),
assertThat(memoryDatabase.getPostReply("reply1"),
isPostReply("reply1", "post1", 3000L, "reply1"));
assertThat(memoryDatabase.getPostReply("reply2"),
assertThat(memoryDatabase.getPostReply("reply3"),
isPostReply("reply3", "post1", 5000L, "reply3"));
assertThat(memoryDatabase.getPostReply("reply4"), nullValue());
assertThat(memoryDatabase.getPostReply("reply3"),
isPostReply("reply3", "post1", 5000L, "reply3"));
assertThat(memoryDatabase.getPostReply("reply4"), nullValue());
isAlbum("album1", null, "album1", "album-description1"));
isAlbum("album1", null, "album1", "album-description1"));
isAlbum("album2", null, "album2", "album-description2"));
isAlbum("album2", null, "album2", "album-description2"));
isAlbum("album3", "album1", "album3", "album-description3"));
isAlbum("album3", "album1", "album3", "album-description3"));
- assertThat(memoryDatabase.getAlbum("album4").isPresent(), is(false));
- assertThat(memoryDatabase.getImage("image1").get(),
+ assertThat(memoryDatabase.getAlbum("album4"), nullValue());
+ assertThat(memoryDatabase.getImage("image1"),
isImage("image1", 1000L, "KSK@image1", "image1",
"image-description1", 16, 9));
isImage("image1", 1000L, "KSK@image1", "image1",
"image-description1", 16, 9));
isImage("image2", 2000L, "KSK@image2", "image2",
"image-description2", 32, 18));
isImage("image2", 2000L, "KSK@image2", "image2",
"image-description2", 32, 18));
isImage("image3", 3000L, "KSK@image3", "image3",
"image-description3", 48, 27));
isImage("image3", 3000L, "KSK@image3", "image3",
"image-description3", 48, 27));