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

Commit ed81c781 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Offer Mockito under Ravenwood.

Thankfully the source tree already has a prebuilt variant of Mockito
that is well-supported for mocking on the host side, so this change
transparently offers that under the Ravenwood environment.

Bug: 319647875
Test: atest SystemUiRavenTests
Change-Id: Id87c25ec18cee454defe0dfbd609eb4cbeca5a95
parent 7c49507e
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -75,6 +75,22 @@ java_genrule {
    ],
}

java_library {
    name: "mockito-ravenwood-prebuilt",
    installable: false,
    static_libs: [
        "mockito-robolectric-prebuilt",
    ],
}

java_library {
    name: "inline-mockito-ravenwood-prebuilt",
    installable: false,
    static_libs: [
        "inline-mockito-robolectric-prebuilt",
    ],
}

android_ravenwood_libgroup {
    name: "ravenwood-runtime",
    libs: [
@@ -86,6 +102,8 @@ android_ravenwood_libgroup {
        "truth",
        "ravenwood-junit-impl",
        "android.test.mock.ravenwood",
        "mockito-ravenwood-prebuilt",
        "inline-mockito-ravenwood-prebuilt",
    ],
}

@@ -95,5 +113,7 @@ android_ravenwood_libgroup {
        "junit",
        "truth",
        "ravenwood-junit",
        "mockito-ravenwood-prebuilt",
        "inline-mockito-ravenwood-prebuilt",
    ],
}
+1 −3
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package com.android.internal.os;

import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.verifyZeroInteractions;

import android.os.FileUtils;

@@ -73,8 +72,7 @@ public class StoragedUidIoStatsReaderTest {
    @Test
    public void testReadNonexistentFile() throws Exception {
        mStoragedUidIoStatsReader.readAbsolute(mCallback);
        verifyZeroInteractions(mCallback);

        verifyNoMoreInteractions(mCallback);
    }

    /**