Use mocked JobParameters.

Use a mock of JobParameters so the test doesn't have to changed or
affected when the JobParameters constructor is changed.

Bug: 253649458
Test: atest NotificationHistoryJobServiceTest
Test: atest ReviewNotificationPermissionsJobServiceTest
Change-Id: Ic13c1de9d9de1db8d498c48c004b2a382118a045
This commit is contained in:
Kweku Adams
2022-11-30 19:46:12 +00:00
parent 813816a4cc
commit 6a24de2ab4
2 changed files with 6 additions and 6 deletions

View File

@@ -52,9 +52,9 @@ import java.lang.reflect.Field;
@RunWith(AndroidTestingRunner.class)
public class NotificationHistoryJobServiceTest extends UiServiceTestCase {
private NotificationHistoryJobService mJobService;
private JobParameters mJobParams = new JobParameters(null,
NotificationHistoryJobService.BASE_JOB_ID, null, null, null,
0, false, false, null, null, null);
@Mock
private JobParameters mJobParams;
@Captor
ArgumentCaptor<JobInfo> mJobInfoCaptor;

View File

@@ -44,9 +44,9 @@ import org.mockito.Mock;
@RunWith(AndroidTestingRunner.class)
public class ReviewNotificationPermissionsJobServiceTest extends UiServiceTestCase {
private ReviewNotificationPermissionsJobService mJobService;
private JobParameters mJobParams = new JobParameters(null,
ReviewNotificationPermissionsJobService.JOB_ID, null, null, null,
0, false, false, null, null, null);
@Mock
private JobParameters mJobParams;
@Captor
ArgumentCaptor<JobInfo> mJobInfoCaptor;