urbanairship-core/src/test/java/com/urbanairship/analytics/AnalyticsTest.java
@Test
    public void testAddEventDisabledAnalytics() {
        analytics.setEnabled(false);
        analytics.addEvent(new AppForegroundEvent(100));
        verify(mockEventManager, never()).addEvent(Mockito.any(AppForegroundEvent.class), Mockito.anyString());
    }
/**
     * Test adding an event when analytics is disabled
     */
Test adding an event when analytics is disabled
Test adding an event when analytics is disabled
@Test
    public void testAddEventDisabledAnalytics() {
        analytics.setEnabled(false);
        analytics.addEvent(new AppForegroundEvent(100));
        verify(mockEventManager, never()).addEvent(Mockito.any(AppForegroundEvent.class), Mockito.anyString());
    }
@ Test public void testAddEventDisabledAnalytics ( ) { analytics . setEnabled ( false ) ; analytics . addEvent ( new AppForegroundEvent ( 100 ) ) ; verify ( mockEventManager , never ( ) ) . addEvent ( Mockito . any ( AppForegroundEvent . class ) , Mockito . anyString ( ) ) ; }
Test adding an event when analytics is disabled
Test adding an event when analytics is disabled