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

Commit 8af4c413 authored by Sungsoo Lim's avatar Sungsoo Lim Committed by Gerrit Code Review
Browse files

Merge "Add a ProfileServiceTest"

parents 813fa19e 74c4723e
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -78,6 +78,11 @@ public class ProfileServiceTest {
        for (Class profile : mProfiles) {
            setProfileState(profile, state);
        }
        if (invocationNumber == 0) {
            verify(mMockAdapterService, after(PROFILE_START_MILLIS).never())
                    .onProfileServiceStateChanged(any(), anyInt());
            return;
        }
        ArgumentCaptor<ProfileService> argument = ArgumentCaptor.forClass(ProfileService.class);
        verify(mMockAdapterService, timeout(PROFILE_START_MILLIS).times(
                mProfiles.length * invocationNumber)).onProfileServiceStateChanged(
@@ -235,4 +240,13 @@ public class ProfileServiceTest {
            profileNumber += 1;
        }
    }

    /**
     * Test: Stop the Bluetooth profile services that are not started.
     * Verify that the profile service state is not changed.
     */
    @Test
    public void testDisable() throws TimeoutException {
        setAllProfilesState(BluetoothAdapter.STATE_OFF, 0);
    }
}