1 package net.pterodactylus.sone.core;
3 import static org.mockito.Matchers.eq;
4 import static org.mockito.Mockito.mock;
5 import static org.mockito.Mockito.verify;
7 import net.pterodactylus.sone.core.Core.MarkPostKnown;
8 import net.pterodactylus.sone.core.Core.MarkReplyKnown;
9 import net.pterodactylus.sone.data.Post;
10 import net.pterodactylus.sone.data.PostReply;
12 import org.junit.Test;
15 * Unit test for {@link Core} and its subclasses.
17 * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
19 public class CoreTest {
22 public void markPostKnownMarksPostAsKnown() {
23 Core core = mock(Core.class);
24 Post post = mock(Post.class);
25 MarkPostKnown markPostKnown = core.new MarkPostKnown(post);
27 verify(core).markPostKnown(eq(post));
31 public void markReplyKnownMarksReplyAsKnown() {
32 Core core = mock(Core.class);
33 PostReply postReply = mock(PostReply.class);
34 MarkReplyKnown markReplyKnown = core.new MarkReplyKnown(postReply);
36 verify(core).markReplyKnown(eq(postReply));