Home
last modified time | relevance | path

Searched refs:observer1 (Results 1 – 2 of 2) sorted by relevance

/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DBatteryStatsTimeBaseTest.java85 BatteryStatsImpl.TimeBaseObs observer1 = Mockito.mock(BatteryStatsImpl.TimeBaseObs.class); in testRunning() local
90 tb.add(observer1); in testRunning()
93 Assert.assertTrue(tb.hasObserver(observer1)); in testRunning()
99 Assert.assertTrue(tb.hasObserver(observer1)); in testRunning()
122 Mockito.verify(observer1).onTimeStarted(14000, 100, 1000); in testRunning()
123 Mockito.verify(observer1, Mockito.never()).onTimeStopped(-1, -1, -1); in testRunning()
124 Mockito.verifyNoMoreInteractions(observer1); in testRunning()
129 Mockito.reset(observer1); in testRunning()
154 Mockito.verify(observer1).onTimeStopped(14002, 252, 1002); in testRunning()
155 Mockito.verify(observer1, Mockito.never()).onTimeStopped(-1, -1, -1); in testRunning()
[all …]
/frameworks/base/tests/PackageWatchdog/src/com/android/server/
DPackageWatchdogTest.java123 TestObserver observer1 = new TestObserver(OBSERVER_NAME_1); in testRegistration() local
128 watchdog.startObservingHealth(observer1, Arrays.asList(APP_A), SHORT_DURATION); in testRegistration()
136 assertEquals(1, watchdog.getPackages(observer1).size()); in testRegistration()
137 assertTrue(watchdog.getPackages(observer1).contains(APP_A)); in testRegistration()
147 watchdog.unregisterHealthObserver(observer1); in testRegistration()
151 assertNull(watchdog.getPackages(observer1)); in testRegistration()
166 assertNull(watchdog.getPackages(observer1)); in testRegistration()
179 assertNull(watchdog.getPackages(observer1)); in testRegistration()
217 TestObserver observer1 = new TestObserver(OBSERVER_NAME_1); in testPersistence() local
220 watchdog1.startObservingHealth(observer1, Arrays.asList(APP_A), SHORT_DURATION); in testPersistence()
[all …]