urbanairship-core/src/test/java/com/urbanairship/actions/ActionServiceTest.java
@Test
    public void testRunActionsPayloadInvalid() {
        ShadowApplication shadowApplication = Shadows.shadowOf(RuntimeEnvironment.application);
        shadowApplication.clearStartedServices();

        String actionsPayload = null;
        ActionService.runActions(context, actionsPayload, Action.SITUATION_WEB_VIEW_INVOCATION, null);

        Intent runActionsIntent = shadowApplication.getNextStartedService();
        assertNull("Action service should not start with a null actions payload",
                runActionsIntent);

        Bundle extras = new Bundle();
        extras.putString("com.urbanairship.actions", "");
        runActionsIntent = shadowApplication.getNextStartedService();
        assertNull("Actions service should not start if the actions payload is empty",
                runActionsIntent);
    }
/**
     * Test that the ActionService.runActionsPayload does not start
     * the service if the actions payload is null or empty
     */
Test that the ActionService.runActionsPayload does not start
the service if the actions payload is null or empty
Test that the ActionService . runActionsPayload does not start the service if the actions payload is null or empty
@Test
    public void testRunActionsPayloadInvalid() {
        ShadowApplication shadowApplication = Shadows.shadowOf(RuntimeEnvironment.application);
        shadowApplication.clearStartedServices();
        String actionsPayload = null;
        ActionService.runActions(context, actionsPayload, Action.SITUATION_WEB_VIEW_INVOCATION, null);
        Intent runActionsIntent = shadowApplication.getNextStartedService();
        assertNull("Action service should not start with a null actions payload",
                runActionsIntent);
        Bundle extras = new Bundle();
        extras.putString("com.urbanairship.actions", "");
        runActionsIntent = shadowApplication.getNextStartedService();
        assertNull("Actions service should not start if the actions payload is empty",
                runActionsIntent);
    }
@ Test public void testRunActionsPayloadInvalid ( ) { ShadowApplication shadowApplication = Shadows . shadowOf ( RuntimeEnvironment . application ) ; shadowApplication . clearStartedServices ( ) ; String actionsPayload = null ; ActionService . runActions ( context , actionsPayload , Action . SITUATION_WEB_VIEW_INVOCATION , null ) ; Intent runActionsIntent = shadowApplication . getNextStartedService ( ) ; assertNull ( "Action service should not start with a null actions payload" , runActionsIntent ) ; Bundle extras = new Bundle ( ) ; extras . putString ( "com.urbanairship.actions" , "" ) ; runActionsIntent = shadowApplication . getNextStartedService ( ) ; assertNull ( "Actions service should not start if the actions payload is empty" , runActionsIntent ) ; }
Test that the ActionService.runActionsPayload does not start
 the service if the actions payload is null or empty
Test that the ActionService . runActionsPayload does not start the service if the actions payload is null or empty