Update AnomalyJobServiceTests.
Update the JobSchedulerImpl constructor for the related tests, specifcally Cleanup, Config, and Detection. Bug: 255371817 Test: make -j RunSettingsRoboTests ROBOTTEST_FILTER="AnomalyCleanupJobServiceTest|AnomalyConfigJobServiceTest|AnomalyDetectionJobServiceTest" Change-Id: I53ccfffc278a60f4b109169fde6675cee34e5fd0
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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());
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user