public void testCanAppendAfterDeletingOnlyRootThreadBlip() { ConversationBlip first = target.getRootThread().appendBlip(); first.delete(); ConversationBlip second = target.getRootThread().appendBlip(); assertBlipInvalid(first); assertBlipValid(second); }
public void testCanAppendAfterDeletingOnlyRootThreadBlip() { ConversationBlip first = target.getRootThread().appendBlip(); first.delete(); ConversationBlip second = target.getRootThread().appendBlip(); assertBlipInvalid(first); assertBlipValid(second); }
public void testCanAppendAfterDeletingRootThreadReplies() { ConversationBlip first = target.getRootThread().appendBlip(); ConversationBlip second = target.getRootThread().appendBlip(); ConversationThread reply = first.addReplyThread(); reply.appendBlip(); second.delete(); first.delete(); ConversationBlip newFirst = target.getRootThread().appendBlip(); assertBlipValid(newFirst); }
public void testCanAppendAfterDeletingRootThreadReplies() { ConversationBlip first = target.getRootThread().appendBlip(); ConversationBlip second = target.getRootThread().appendBlip(); ConversationThread reply = first.addReplyThread(); reply.appendBlip(); second.delete(); first.delete(); ConversationBlip newFirst = target.getRootThread().appendBlip(); assertBlipValid(newFirst); }
public void testCanReplyAfterDeletingReplyThread() { ConversationThread topThread = target.getRootThread().appendBlip().addReplyThread(); ConversationBlip topBlip = topThread.appendBlip(); // Add two reply threads. Delete the second (by deleting its blip). ConversationThread firstReply = topBlip.addReplyThread(); firstReply.appendBlip(); ConversationThread secondReply = topBlip.addReplyThread(); secondReply.appendBlip().delete(); // Reply again. This used to throw IndexOutOfBounds. ConversationThread replacementReply = topBlip.addReplyThread(); ConversationBlip replacementBlip = replacementReply.appendBlip(); assertBlipValid(replacementBlip); assertEquals(Arrays.asList(firstReply, replacementReply), CollectionUtils.newArrayList(topBlip.getReplyThreads())); }
public void testCanReplyAfterDeletingReplyThread() { ConversationThread topThread = target.getRootThread().appendBlip().addReplyThread(); ConversationBlip topBlip = topThread.appendBlip(); // Add two reply threads. Delete the second (by deleting its blip). ConversationThread firstReply = topBlip.addReplyThread(); firstReply.appendBlip(); ConversationThread secondReply = topBlip.addReplyThread(); secondReply.appendBlip().delete(); // Reply again. This used to throw IndexOutOfBounds. ConversationThread replacementReply = topBlip.addReplyThread(); ConversationBlip replacementBlip = replacementReply.appendBlip(); assertBlipValid(replacementBlip); assertEquals(Arrays.asList(firstReply, replacementReply), CollectionUtils.newArrayList(topBlip.getReplyThreads())); }