Merge "Update AnomalyJobServiceTests."

This commit is contained in:
TreeHugger Robot
2022-11-19 10:52:54 +00:00
committed by Android (Google) Code Review
3 changed files with 6 additions and 3 deletions

View File

@@ -71,7 +71,8 @@ public class AnomalyCleanupJobServiceTest {
MockitoAnnotations.initMocks(this);
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);
}

View File

@@ -69,7 +69,8 @@ public class AnomalyConfigJobServiceTest {
MockitoAnnotations.initMocks(this);
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);
mJobService = spy(new AnomalyConfigJobService());

View File

@@ -113,7 +113,8 @@ public class AnomalyDetectionJobServiceTest {
MockitoAnnotations.initMocks(this);
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);
mPolicy = new BatteryTipPolicy(mContext);