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

Commit 2559f02d authored by Mill Chen's avatar Mill Chen
Browse files

Clean up unnecessary spy context statements

Remove spy context syntax because we do not need to
mock context anymore in the test cases.

Bug: 117644158
Test: robotests
Change-Id: I222eec4fbc1994d7bb79adead40b76ac0a000bdc
parent 53313551
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -19,8 +19,6 @@ package com.android.settings.bluetooth;

import static com.google.common.truth.Truth.assertThat;

import static org.mockito.Mockito.spy;

import android.bluetooth.BluetoothAdapter;
import android.content.Context;
import android.content.Intent;
@@ -56,7 +54,7 @@ public class BluetoothSliceBuilderTest {
    @Before
    public void setUp() {
        MockitoAnnotations.initMocks(this);
        mContext = spy(RuntimeEnvironment.application);
        mContext = RuntimeEnvironment.application;

        // Set-up specs for SliceMetadata.
        SliceProvider.setSpecs(SliceLiveData.SUPPORTED_SPECS);
+1 −3
Original line number Diff line number Diff line
@@ -19,8 +19,6 @@ package com.android.settings.flashlight;

import static com.google.common.truth.Truth.assertThat;

import static org.mockito.Mockito.spy;

import android.content.Context;
import android.provider.Settings;

@@ -50,7 +48,7 @@ public class FlashlightSliceBuilderTest {

    @Before
    public void setUp() {
        mContext = spy(RuntimeEnvironment.application);
        mContext = RuntimeEnvironment.application;

        // Set-up specs for SliceMetadata.
        SliceProvider.setSpecs(SliceLiveData.SUPPORTED_SPECS);
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ public class DataUsageSliceTest {

    @Before
    public void setUp() {
        mContext = spy(RuntimeEnvironment.application);
        mContext = RuntimeEnvironment.application;

        // Set-up specs for SliceMetadata.
        SliceProvider.setSpecs(SliceLiveData.SUPPORTED_SPECS);
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ public class DeviceInfoSliceTest {
    @Before
    public void setUp() {
        MockitoAnnotations.initMocks(this);
        mContext = spy(RuntimeEnvironment.application);
        mContext = RuntimeEnvironment.application;

        // Set-up specs for SliceMetadata.
        SliceProvider.setSpecs(SliceLiveData.SUPPORTED_SPECS);
+1 −3
Original line number Diff line number Diff line
@@ -19,12 +19,10 @@ package com.android.settings.homepage.deviceinfo;
import static com.google.common.truth.Truth.assertThat;

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.spy;

import android.content.Context;
import android.content.res.Resources;

import androidx.core.graphics.drawable.IconCompat;
import androidx.slice.Slice;
@@ -56,7 +54,7 @@ public class StorageSliceTest {

    @Before
    public void setUp() {
        mContext = spy(RuntimeEnvironment.application);
        mContext = RuntimeEnvironment.application;

        // Set-up specs for SliceMetadata.
        SliceProvider.setSpecs(SliceLiveData.SUPPORTED_SPECS);
Loading