Home
last modified time | relevance | path

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

/frameworks/base/tests/PackageWatchdog/src/com/android/server/
DPackageWatchdogTest.java124 TestObserver observer2 = new TestObserver(OBSERVER_NAME_2); in testRegistration() local
130 watchdog.startObservingHealth(observer2, Arrays.asList(APP_A, APP_B), SHORT_DURATION); in testRegistration()
139 assertEquals(2, watchdog.getPackages(observer2).size()); in testRegistration()
140 assertTrue(watchdog.getPackages(observer2).contains(APP_A)); in testRegistration()
141 assertTrue(watchdog.getPackages(observer2).contains(APP_B)); in testRegistration()
153 assertEquals(2, watchdog.getPackages(observer2).size()); in testRegistration()
154 assertTrue(watchdog.getPackages(observer2).contains(APP_A)); in testRegistration()
155 assertTrue(watchdog.getPackages(observer2).contains(APP_B)); in testRegistration()
168 assertNull(watchdog.getPackages(observer2)); in testRegistration()
181 assertNull(watchdog.getPackages(observer2)); in testRegistration()
[all …]
/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DBatteryStatsTimeBaseTest.java86 BatteryStatsImpl.TimeBaseObs observer2 = Mockito.mock(BatteryStatsImpl.TimeBaseObs.class); in testRunning() local
91 tb.add(observer2); in testRunning()
94 Assert.assertTrue(tb.hasObserver(observer2)); in testRunning()
100 Assert.assertTrue(tb.hasObserver(observer2)); in testRunning()
125 Mockito.verify(observer2).onTimeStarted(14000, 100, 1000); in testRunning()
126 Mockito.verify(observer2, Mockito.never()).onTimeStopped(-1, -1, -1); in testRunning()
127 Mockito.verifyNoMoreInteractions(observer2); in testRunning()
130 Mockito.reset(observer2); in testRunning()
157 Mockito.verify(observer2).onTimeStopped(14002, 252, 1002); in testRunning()
158 Mockito.verify(observer2, Mockito.never()).onTimeStopped(-1, -1, -1); in testRunning()
[all …]