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

Commit 98df216a authored by William Escande's avatar William Escande
Browse files

A2dpService: Test: re-order test variable

move in order:
* constant declarations,
* constant external dependency
* mock that are auto inited
* test variable

Bug: 321252288
Test: atest A2dpServiceTest
Flag: Exempt, Test only
Change-Id: I3e7732bd7e5755dca1134193fbce2110ce310862
parent d8d262f7
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -37,7 +37,6 @@ import android.os.ParcelUuid;

import androidx.test.InstrumentationRegistry;
import androidx.test.filters.MediumTest;
import androidx.test.rule.ServiceTestRule;
import androidx.test.runner.AndroidJUnit4;

import com.android.bluetooth.TestUtils;
@@ -53,7 +52,6 @@ import org.hamcrest.core.AllOf;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
@@ -70,14 +68,12 @@ import java.util.List;
@RunWith(AndroidJUnit4.class)
public class A2dpServiceTest {
    private static final int MAX_CONNECTED_AUDIO_DEVICES = 5;
    private static final Duration TIMEOUT = Duration.ofSeconds(1);

    private static final BluetoothAdapter sAdapter = BluetoothAdapter.getDefaultAdapter();
    private A2dpService mA2dpService;
    private static final BluetoothDevice sTestDevice =
            sAdapter.getRemoteDevice("00:01:02:03:04:05");
    private static final Duration TIMEOUT = Duration.ofSeconds(1);

    private FakeFeatureFlagsImpl mFakeFlagsImpl;
    @Mock private A2dpNativeInterface mMockNativeInterface;
    @Mock private ActiveDeviceManager mActiveDeviceManager;
    @Mock private AdapterService mAdapterService;
@@ -87,7 +83,8 @@ public class A2dpServiceTest {
    @Mock private SilenceDeviceManager mSilenceDeviceManager;
    private InOrder mInOrder = null;

    @Rule public final ServiceTestRule mServiceRule = new ServiceTestRule();
    private A2dpService mA2dpService;
    private FakeFeatureFlagsImpl mFakeFlagsImpl;

    @Before
    public void setUp() throws Exception {