Home | History | Annotate | Download | only in provider

Lines Matching refs:box2

74         Mailbox box2 = EmailContentSetupUtils.setupMailbox("box2", mAccount.mId, true,
93 box2 = Mailbox.restoreMailboxWithId(mProviderContext, box2.mId);
103 assertEquals(Mailbox.FLAG_HOLDS_MAIL, box2.mFlags);
104 assertEquals(box1.mId, box2.mParentKey);
136 Mailbox box2 = EmailContentSetupUtils.setupMailbox(
137 "box2", mAccount.mId, true, mProviderContext, Mailbox.TYPE_MAIL, box1);
145 box2 = Mailbox.restoreMailboxWithId(mProviderContext, box2.mId);
151 assertEquals(CHILD_FLAGS, box2.mFlags);
152 assertEquals(box1.mId, box2.mParentKey);
163 box2 = Mailbox.restoreMailboxWithId(mProviderContext, box2.mId);
170 assertEquals(CHILD_FLAGS, box2.mFlags);
171 assertEquals(box1.mId, box2.mParentKey);
187 Mailbox box2 = EmailContentSetupUtils.setupMailbox(
188 "box2", mAccount.mId, true, mProviderContext, Mailbox.TYPE_MAIL, box1);
198 // The specific test: Create a 3rd mailbox and attach it to box2 (currently a child)
201 "box3", mAccount.mId, false, mProviderContext, Mailbox.TYPE_MAIL, box2);
207 box2 = Mailbox.restoreMailboxWithId(mProviderContext, box2.mId);
214 assertEquals(PARENT_FLAGS, box2.mFlags); // should become a parent
215 assertEquals(box1.mId, box2.mParentKey);
217 assertEquals(CHILD_FLAGS, box3.mFlags); // should be child of box2
218 assertEquals(box2.mId, box3.mParentKey);
231 Mailbox box2 = EmailContentSetupUtils.setupMailbox(
232 "box2", mAccount.mId, true, mProviderContext, Mailbox.TYPE_MAIL, box1);
251 box2 = Mailbox.restoreMailboxWithId(mProviderContext, box2.mId);
258 assertEquals(CHILD_FLAGS, box2.mFlags);
259 assertEquals(box1.mId, box2.mParentKey);
276 Mailbox box2 = EmailContentSetupUtils.setupMailbox(
277 "box2", mAccount.mId, true, mProviderContext, Mailbox.TYPE_MAIL, box1);
287 box2 = Mailbox.restoreMailboxWithId(mProviderContext, box2.mId);
294 assertEquals(CHILD_FLAGS, box2.mFlags);
295 assertEquals(box1.mId, box2.mParentKey);
305 box2 = Mailbox.restoreMailboxWithId(mProviderContext, box2.mId);
312 assertEquals(CHILD_FLAGS, box2.mFlags);
313 assertEquals(box1.mId, box2.mParentKey);
326 // Initial configuration for this test: box1 has box2 and box2 has box3.
329 Mailbox box2 = EmailContentSetupUtils.setupMailbox(
330 "box2", mAccount.mId, true, mProviderContext, Mailbox.TYPE_MAIL, box1);
332 "box3", mAccount.mId, true, mProviderContext, Mailbox.TYPE_MAIL, box2);
340 box2 = Mailbox.restoreMailboxWithId(mProviderContext, box2.mId);
347 assertEquals(PARENT_FLAGS, box2.mFlags); // becomes a parent
348 assertEquals(box1.mId, box2.mParentKey);
351 assertEquals(box2.mId, box3.mParentKey);
355 simulateFolderSyncChangeHandling(accountSelector, box2 /*box3's parent*/);
358 box2 = Mailbox.restoreMailboxWithId(mProviderContext, box2.mId);
365 assertEquals(CHILD_FLAGS, box2.mFlags); // Becomes a child
366 assertEquals(box1.mId, box2.mParentKey);
379 // Initial configuration for this test: box1 has box2, box3 is also at root.
382 Mailbox box2 = EmailContentSetupUtils.setupMailbox(
383 "box2", mAccount.mId, true, mProviderContext, Mailbox.TYPE_MAIL, box1);
393 box2 = Mailbox.restoreMailboxWithId(mProviderContext, box2.mId);
400 assertEquals(CHILD_FLAGS, box2.mFlags);
401 assertEquals(box1.mId, box2.mParentKey);
411 box2 = Mailbox.restoreMailboxWithId(mProviderContext, box2.mId);
418 assertEquals(CHILD_FLAGS, box2.mFlags); // Should still be a child
419 assertEquals(box1.mId, box2.mParentKey);
432 // Initial configuration for this test: box1 has box2, box3 is also at root.
435 Mailbox box2 = EmailContentSetupUtils.setupMailbox(
436 "box2", mAccount.mId, true, mProviderContext, Mailbox.TYPE_MAIL, box1);
446 box2 = Mailbox.restoreMailboxWithId(mProviderContext, box2.mId);
453 assertEquals(CHILD_FLAGS, box2.mFlags);
454 assertEquals(box1.mId, box2.mParentKey);
461 values.put(Mailbox.PARENT_SERVER_ID, box2.mServerId);
464 simulateFolderSyncChangeHandling(accountSelector, box2 /*box3's new parent*/);
467 box2 = Mailbox.restoreMailboxWithId(mProviderContext, box2.mId);
474 assertEquals(PARENT_FLAGS, box2.mFlags); // Should now be a parent
475 assertEquals(box1.mId, box2.mParentKey);
477 assertEquals(CHILD_FLAGS, box3.mFlags); // Should still be a child (of box2)
478 assertEquals(box2.mId, box3.mParentKey);
489 // Initial configuration for this test: box1 has box2, box3 is also at root.
492 Mailbox box2 = EmailContentSetupUtils.setupMailbox(
493 "box2", mAccount.mId, true, mProviderContext, Mailbox.TYPE_MAIL, box1);
501 box2 = Mailbox.restoreMailboxWithId(mProviderContext, box2.mId);
507 assertEquals(CHILD_FLAGS, box2.mFlags);
508 assertEquals(box1.mId, box2.mParentKey);
510 // The specific test: Remove the parent from box2 and check remaining configuration
513 mResolver.update(ContentUris.withAppendedId(Mailbox.CONTENT_URI, box2.mId), values,
517 mResolver.update(ContentUris.withAppendedId(Mailbox.CONTENT_URI, box2.mId), mNullParentKey,
519 simulateFolderSyncChangeHandling(accountSelector, box1 /*box2's old parent*/);
522 box2 = Mailbox.restoreMailboxWithId(mProviderContext, box2.mId);
528 assertEquals(CHILD_FLAGS, box2.mFlags); // Should still be a child (no parent)
529 assertEquals(-1, box2.mParentKey);
540 // Initial configuration for this test: box1 has no serverId, box2 is a child of box1
545 Mailbox box2 = EmailContentSetupUtils.setupMailbox(
546 "box2", mAccount.mId, true, mProviderContext, Mailbox.TYPE_OUTBOX, box1);
554 box2 = Mailbox.restoreMailboxWithId(mProviderContext, box2.mId);
556 // Box 1 should be a child, even though it is defined as the parent of box2, because it
563 assertEquals(Mailbox.NO_MAILBOX, box2.mParentKey);
564 assertEquals(Mailbox.FLAG_HOLDS_MAIL, box2.mFlags);
575 // Initial configuration for this test: box1 has box2, box3 is also at root.
578 Mailbox box2 = EmailContentSetupUtils.setupMailbox(
579 "box2", mAccount.mId, true, mProviderContext, Mailbox.TYPE_MAIL);
589 box2 = Mailbox.restoreMailboxWithId(mProviderContext, box2.mId);
596 assertEquals(CHILD_FLAGS, box2.mFlags);
597 assertEquals(-1, box2.mParentKey);
604 values.put(Mailbox.PARENT_SERVER_ID, box2.mServerId);
608 simulateFolderSyncChangeHandling(accountSelector, box2 /*box3's new parent*/,
612 box2 = Mailbox.restoreMailboxWithId(mProviderContext, box2.mId);
619 assertEquals(PARENT_FLAGS, box2.mFlags); // Should now be a parent
620 assertEquals(-1, box2.mParentKey);
622 assertEquals(CHILD_FLAGS, box3.mFlags); // Should still be a child (of box2)
623 assertEquals(box2.mId, box3.mParentKey);
645 Mailbox box2 = EmailContentSetupUtils.setupMailbox(
646 "box2", mAccount.mId, false, mProviderContext, Mailbox.TYPE_MAIL);
647 box2.mServerId = "1:2";
648 box2.save(mProviderContext);
676 box2 = Mailbox.restoreMailboxWithId(mProviderContext, box2.mId);
683 assertEquals(CHILD_FLAGS, box2.mFlags);
684 assertEquals(-1, box2
719 box2 = Mailbox.restoreMailboxWithId(mProviderContext, box2.mId);
726 assertEquals(CHILD_FLAGS, box2.mFlags);
727 assertEquals(-1, box2.mParentKey);
736 box2 = Mailbox.restoreMailboxWithId(mProviderContext, box2.mId);
743 assertEquals(CHILD_FLAGS, box2.mFlags);
744 assertEquals(-1, box2.mParentKey);