Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a24de2a authored by Kweku Adams's avatar Kweku Adams
Browse files

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
parent 813816a4
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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;
+3 −3
Original line number Diff line number Diff line
@@ -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;