urbanairship-core/src/test/java/com/urbanairship/actions/OverlayRichPushMessageActionTest.java
@Test
    public void testPerformMessageIdPlaceHolderPushMetadata() {
        RichPushMessage message = mock(RichPushMessage.class);
        when(message.getMessageId()).thenReturn("the_message_id");
        when(mockInbox.getMessage("the_message_id")).thenReturn(message);

        Bundle pushBundle = new Bundle();
        pushBundle.putString(PushMessage.EXTRA_RICH_PUSH_ID, "the_message_id");
        Bundle metadata = new Bundle();
        metadata.putParcelable(ActionArguments.PUSH_MESSAGE_METADATA, new PushMessage(pushBundle));

        action.perform(ActionTestUtils.createArgs(Action.SITUATION_MANUAL_INVOCATION, "auto", metadata));

        Intent startedIntent = ShadowApplication.getInstance().getNextStartedActivity();
        assertEquals("com.urbanairship.actions.SHOW_LANDING_PAGE_INTENT_ACTION", startedIntent.getAction());
        assertEquals("message:the_message_id", startedIntent.getDataString());
    }
/**
     * Test "auto" placeholder looks for the message's ID in the push message metadata.
     */
Test "auto" placeholder looks for the message's ID in the push message metadata.
Test " auto " placeholder looks for the message ' s ID in the push message metadata .
@Test
    public void testPerformMessageIdPlaceHolderPushMetadata() {
        RichPushMessage message = mock(RichPushMessage.class);
        when(message.getMessageId()).thenReturn("the_message_id");
        when(mockInbox.getMessage("the_message_id")).thenReturn(message);
        Bundle pushBundle = new Bundle();
        pushBundle.putString(PushMessage.EXTRA_RICH_PUSH_ID, "the_message_id");
        Bundle metadata = new Bundle();
        metadata.putParcelable(ActionArguments.PUSH_MESSAGE_METADATA, new PushMessage(pushBundle));
        action.perform(ActionTestUtils.createArgs(Action.SITUATION_MANUAL_INVOCATION, "auto", metadata));
        Intent startedIntent = ShadowApplication.getInstance().getNextStartedActivity();
        assertEquals("com.urbanairship.actions.SHOW_LANDING_PAGE_INTENT_ACTION", startedIntent.getAction());
        assertEquals("message:the_message_id", startedIntent.getDataString());
    }
@ Test public void testPerformMessageIdPlaceHolderPushMetadata ( ) { RichPushMessage message = mock ( RichPushMessage . class ) ; when ( message . getMessageId ( ) ) . thenReturn ( "the_message_id" ) ; when ( mockInbox . getMessage ( "the_message_id" ) ) . thenReturn ( message ) ; Bundle pushBundle = new Bundle ( ) ; pushBundle . putString ( PushMessage . EXTRA_RICH_PUSH_ID , "the_message_id" ) ; Bundle metadata = new Bundle ( ) ; metadata . putParcelable ( ActionArguments . PUSH_MESSAGE_METADATA , new PushMessage ( pushBundle ) ) ; action . perform ( ActionTestUtils . createArgs ( Action . SITUATION_MANUAL_INVOCATION , "auto" , metadata ) ) ; Intent startedIntent = ShadowApplication . getInstance ( ) . getNextStartedActivity ( ) ; assertEquals ( "com.urbanairship.actions.SHOW_LANDING_PAGE_INTENT_ACTION" , startedIntent . getAction ( ) ) ; assertEquals ( "message:the_message_id" , startedIntent . getDataString ( ) ) ; }
Test "auto" placeholder looks for the message's ID in the push message metadata.
Test " auto " placeholder looks for the message ' s ID in the push message metadata .