Merge "Update AnomalyJobServiceTests."
This commit is contained in:
committed by
Android (Google) Code Review
commit
e1322d0a54
@@ -71,7 +71,8 @@ public class AnomalyCleanupJobServiceTest {
|
|||||||
MockitoAnnotations.initMocks(this);
|
MockitoAnnotations.initMocks(this);
|
||||||
|
|
||||||
mContext = spy(RuntimeEnvironment.application);
|
mContext = spy(RuntimeEnvironment.application);
|
||||||
mJobScheduler = spy(new JobSchedulerImpl(IJobScheduler.Stub.asInterface(new Binder())));
|
mJobScheduler = spy(new JobSchedulerImpl(mContext,
|
||||||
|
IJobScheduler.Stub.asInterface(new Binder())));
|
||||||
when(mContext.getSystemService(JobScheduler.class)).thenReturn(mJobScheduler);
|
when(mContext.getSystemService(JobScheduler.class)).thenReturn(mJobScheduler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -69,7 +69,8 @@ public class AnomalyConfigJobServiceTest {
|
|||||||
MockitoAnnotations.initMocks(this);
|
MockitoAnnotations.initMocks(this);
|
||||||
|
|
||||||
mContext = spy(RuntimeEnvironment.application);
|
mContext = spy(RuntimeEnvironment.application);
|
||||||
mJobScheduler = spy(new JobSchedulerImpl(IJobScheduler.Stub.asInterface(new Binder())));
|
mJobScheduler = spy(new JobSchedulerImpl(mContext,
|
||||||
|
IJobScheduler.Stub.asInterface(new Binder())));
|
||||||
when(mContext.getSystemService(JobScheduler.class)).thenReturn(mJobScheduler);
|
when(mContext.getSystemService(JobScheduler.class)).thenReturn(mJobScheduler);
|
||||||
|
|
||||||
mJobService = spy(new AnomalyConfigJobService());
|
mJobService = spy(new AnomalyConfigJobService());
|
||||||
|
@@ -113,7 +113,8 @@ public class AnomalyDetectionJobServiceTest {
|
|||||||
MockitoAnnotations.initMocks(this);
|
MockitoAnnotations.initMocks(this);
|
||||||
|
|
||||||
mContext = spy(RuntimeEnvironment.application);
|
mContext = spy(RuntimeEnvironment.application);
|
||||||
mJobScheduler = spy(new JobSchedulerImpl(IJobScheduler.Stub.asInterface(new Binder())));
|
mJobScheduler = spy(new JobSchedulerImpl(mContext,
|
||||||
|
IJobScheduler.Stub.asInterface(new Binder())));
|
||||||
when(mContext.getSystemService(JobScheduler.class)).thenReturn(mJobScheduler);
|
when(mContext.getSystemService(JobScheduler.class)).thenReturn(mJobScheduler);
|
||||||
|
|
||||||
mPolicy = new BatteryTipPolicy(mContext);
|
mPolicy = new BatteryTipPolicy(mContext);
|
||||||
|
Reference in New Issue
Block a user