/** * Checks that the set of all reply threads of a blip is the same as the union * of the inline reply and non-inline reply threads. */ private static void assertThreadChildrenConsistent(ConversationBlip blip) { Set<ConversationThread> allChildren = new HashSet<ConversationThread>(); for (ConversationThread thread : blip.getReplyThreads()) { assertFalse(allChildren.contains(thread)); allChildren.add(thread); } for (ConversationThread child : blip.getReplyThreads()) { assertTrue(allChildren.contains(child)); allChildren.remove(child); } // make sure they are exactly equals assertEquals(0, allChildren.size()); }
/** * Checks that the set of all reply threads of a blip is the same as the union * of the inline reply and non-inline reply threads. */ private static void assertThreadChildrenConsistent(ConversationBlip blip) { Set<ConversationThread> allChildren = new HashSet<ConversationThread>(); for (ConversationThread thread : blip.getReplyThreads()) { assertFalse(allChildren.contains(thread)); allChildren.add(thread); } for (ConversationThread child : blip.getReplyThreads()) { assertTrue(allChildren.contains(child)); allChildren.remove(child); } // make sure they are exactly equals assertEquals(0, allChildren.size()); }
public void testCreateAnchor() { populate(alternate); ConversationBlip blip = getFirstBlip(alternate); Anchor anchor = alternate.createAnchor(blip); assertTrue(alternate == anchor.getConversation()); assertTrue(blip == anchor.getBlip()); }
public void testCreateAnchor() { populate(alternate); ConversationBlip blip = getFirstBlip(alternate); Anchor anchor = alternate.createAnchor(blip); assertTrue(alternate == anchor.getConversation()); assertTrue(blip == anchor.getBlip()); }
public void testSetAnchor() { populate(alternate); ConversationBlip blip = getFirstBlip(alternate); Anchor anchor = alternate.createAnchor(blip); target.setAnchor(anchor); assertTrue(target.hasAnchor()); assertEquals(anchor, target.getAnchor()); }
public void testSetAnchor() { populate(alternate); ConversationBlip blip = getFirstBlip(alternate); Anchor anchor = alternate.createAnchor(blip); target.setAnchor(anchor); assertTrue(target.hasAnchor()); assertEquals(anchor, target.getAnchor()); }
public void testAnchorStillAccessibleAfterBlipAdded() { populate(alternate); ConversationBlip blip = getFirstBlip(alternate); Anchor anchor = alternate.createAnchor(blip); target.setAnchor(anchor); target.getRootThread().appendBlip(); target.getRootThread().getFirstBlip().delete(); assertTrue(target.hasAnchor()); assertEquals(anchor, target.getAnchor()); }
public void testAnchorStillAccessibleAfterBlipAdded() { populate(alternate); ConversationBlip blip = getFirstBlip(alternate); Anchor anchor = alternate.createAnchor(blip); target.setAnchor(anchor); target.getRootThread().appendBlip(); target.getRootThread().getFirstBlip().delete(); assertTrue(target.hasAnchor()); assertEquals(anchor, target.getAnchor()); }