urbanairship-core/src/test/java/com/urbanairship/remotedata/RemoteDataTest.java
@Test
    public void testForegroundTransition() {
        remoteData.init();
        clearInvocations(mockDispatcher);
        activityMonitor.startActivity();

        verify(mockDispatcher).dispatch(Mockito.argThat(new ArgumentMatcher<JobInfo>() {
            @Override
            public boolean matches(JobInfo jobInfo) {
                return jobInfo.getAction().equals(RemoteDataJobHandler.ACTION_REFRESH);
            }
        }));

        verifyNoMoreInteractions(mockDispatcher);
    }
/**
     * Test that a transition to foreground results in a refresh.
     */
Test that a transition to foreground results in a refresh.
Test that a transition to foreground results in a refresh .
@Test
    public void testForegroundTransition() {
        remoteData.init();
        clearInvocations(mockDispatcher);
        activityMonitor.startActivity();
        verify(mockDispatcher).dispatch(Mockito.argThat(new ArgumentMatcher<JobInfo>() {
            @Override
            public boolean matches(JobInfo jobInfo) {
                return jobInfo.getAction().equals(RemoteDataJobHandler.ACTION_REFRESH);
            }
        }));
        verifyNoMoreInteractions(mockDispatcher);
    }
@ Test public void testForegroundTransition ( ) { remoteData . init ( ) ; clearInvocations ( mockDispatcher ) ; activityMonitor . startActivity ( ) ; verify ( mockDispatcher ) . dispatch ( Mockito . argThat ( new ArgumentMatcher < JobInfo > ( ) { @ Override public boolean matches ( JobInfo jobInfo ) { return jobInfo . getAction ( ) . equals ( RemoteDataJobHandler . ACTION_REFRESH ) ; } } ) ) ; verifyNoMoreInteractions ( mockDispatcher ) ; }
Test that a transition to foreground results in a refresh.
Test that a transition to foreground results in a refresh .