public void testRestoreFromBundleTooManyConversationId() { Bundle bundle = new Bundle(); ArrayList<Conversation> conversations = new ArrayList<Conversation>(TWELVE); ArrayList<ConversationId> conversationIds = new ArrayList<ConversationId>(TWELVE + 1); bundle.putParcelableArrayList(CONVERSATION_ID, conversationIds); bundle.putParcelableArrayList(CONVERSATION, conversations); mDialogueData.restoreFromBundle(bundle); // nothing should happen }
public void testRestoreFromNullBundle() { try { mDialogueData.restoreFromBundle(null); fail("NullArgumentException expected"); } catch (NullArgumentException e) { // all good :) } }
public void testRestoreFromBundleNullConversationId() { Bundle bundle = new Bundle(); bundle.putParcelableArrayList(CONVERSATION_ID, null); mDialogueData.restoreFromBundle(bundle); // nothing should happen }