/** * Checks that a conversation is accessible by examining some state. */ protected static void assertConversationAccessible(Conversation conversation) { conversation.getAnchor(); assertThreadAccessible(conversation.getRootThread()); }
/** * Checks that a conversation is accessible by examining some state. */ protected static void assertConversationAccessible(Conversation conversation) { conversation.getAnchor(); assertThreadAccessible(conversation.getRootThread()); }
/** * Tests that methods which access the state of a thread without changing it * are correct after thread deletion. */ public void testThreadCanBeAccessedAfterDeletion() { ConversationBlip blip = target.getRootThread().appendBlip(); ConversationThread thread = blip.addReplyThread(); ConversationBlip replyBlip = thread.appendBlip(); thread.delete(); assertBlipInvalid(replyBlip); assertBlipAccessible(replyBlip); assertThreadInvalid(thread); assertThreadAccessible(thread); assertEquals(blip, thread.getParentBlip()); assertFalse(blip.getReplyThreads().iterator().hasNext()); assertEquals(thread, replyBlip.getThread()); assertEquals(Collections.emptyList(), getBlipList(thread)); }
/** * Tests that methods which access the state of a thread without changing it * are correct after thread deletion. */ public void testThreadCanBeAccessedAfterDeletion() { ConversationBlip blip = target.getRootThread().appendBlip(); ConversationThread thread = blip.addReplyThread(); ConversationBlip replyBlip = thread.appendBlip(); thread.delete(); assertBlipInvalid(replyBlip); assertBlipAccessible(replyBlip); assertThreadInvalid(thread); assertThreadAccessible(thread); assertEquals(blip, thread.getParentBlip()); assertFalse(blip.getReplyThreads().iterator().hasNext()); assertEquals(thread, replyBlip.getThread()); assertEquals(Collections.emptyList(), getBlipList(thread)); }