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

Commit d3207f94 authored by Almaz Mingaleev's avatar Almaz Mingaleev
Browse files

Fix TimeDetectorServiceTest.

Wrong method was mocked. Also tests were not run under TH,
that is being addressed.

Bug: 182461754
Test: atest services/tests/servicestests/src/com/android/server/timedetector/*
Change-Id: Ic5c004dcb06ef68e89bc4f32c2cfc92ec6ce5060
parent facfd3be
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -209,7 +209,7 @@ public class TimeDetectorServiceTest {
    @Test(expected = SecurityException.class)
    @Test(expected = SecurityException.class)
    public void testSuggestExternalTime_withoutPermission() {
    public void testSuggestExternalTime_withoutPermission() {
        doThrow(new SecurityException("Mock"))
        doThrow(new SecurityException("Mock"))
                .when(mMockContext).enforceCallingOrSelfPermission(anyString(), any());
                .when(mMockContext).enforceCallingPermission(anyString(), any());
        ExternalTimeSuggestion externalTimeSuggestion = createExternalTimeSuggestion();
        ExternalTimeSuggestion externalTimeSuggestion = createExternalTimeSuggestion();


        try {
        try {