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

Commit c1253799 authored by Jack He's avatar Jack He
Browse files

Init mocks after checking assumptions in MapClientStateMachineTest

Test: atest BluetoothInstrumentationTests
Bug: 190659805

Change-Id: I4bb0c2163ec46b2179e531628a9979a9d5f8a7e0
parent 827f320d
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -102,13 +102,12 @@ public class MapClientStateMachineTest {

    @Before
    public void setUp() throws Exception {
        MockitoAnnotations.initMocks(this);
        mTargetContext = InstrumentationRegistry.getTargetContext();
        mMockContentProvider = new MockSmsContentProvider();
        mMockContentResolver = new MockContentResolver();

        Assume.assumeTrue("Ignore test when MapClientService is not enabled",
                mTargetContext.getResources().getBoolean(R.bool.profile_supported_mapmce));
        MockitoAnnotations.initMocks(this);
        mMockContentProvider = new MockSmsContentProvider();
        mMockContentResolver = new MockContentResolver();
        TestUtils.setAdapterService(mAdapterService);
        when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager);
        doReturn(true, false).when(mAdapterService).isStartedProfile(anyString());