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

Commit 0b427fd3 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix ExtServices tests"

parents fb0ce841 38cdbafa
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
android_library {
    name: "ExtServices-core",
     srcs: [
         "src/**/*.java",
     ],
     resource_dirs: [
         "res",
     ],

     manifest: "AndroidManifest.xml",
}
 No newline at end of file
+26 −0
Original line number Diff line number Diff line
android_test {
    name: "ExtServicesUnitTests",

    // Include all test java files.
    srcs: ["src/**/*.java"],

    // We only want this apk build for tests.
    certificate: "platform",

    libs: [
        "android.test.runner",
        "android.test.base",
    ],

    static_libs: [
        "ExtServices-core",
        "android-support-test",
        "mockito-target-minus-junit4",
        "espresso-core",
        "truth-prebuilt",
        "testables",
        "testng",
    ],

    platform_apis: true,
}
 No newline at end of file
+0 −26
Original line number Diff line number Diff line
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

# We only want this apk build for tests.
LOCAL_MODULE_TAGS := tests
LOCAL_CERTIFICATE := platform

LOCAL_JAVA_LIBRARIES := android.test.runner android.test.base

LOCAL_STATIC_JAVA_LIBRARIES := \
    android-support-test \
    mockito-target-minus-junit4 \
    espresso-core \
    truth-prebuilt \
    testables \
    testng

# Include all test java files.
LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_PACKAGE_NAME := ExtServicesUnitTests
LOCAL_PRIVATE_PLATFORM_APIS := true

LOCAL_INSTRUMENTATION_FOR := ExtServices

include $(BUILD_PACKAGE)
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@
    </application>

    <instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
                     android:targetPackage="android.ext.services"
                     android:targetPackage="android.ext.services.tests.unit"
                     android:label="ExtServices Test Cases">
    </instrumentation>

+1 −1
Original line number Diff line number Diff line
@@ -180,7 +180,7 @@ public class NotificationCategorizerTest {
        assertFalse(nc.shouldSilence(NotificationCategorizer.CATEGORY_SYSTEM));

        when(mSbn.getUid()).thenReturn(FIRST_APPLICATION_UID);
        assertEquals(NotificationCategorizer.CATEGORY_EVERYTHING_ELSE, nc.getCategory(mEntry));
        assertEquals(NotificationCategorizer.CATEGORY_HIGH, nc.getCategory(mEntry));
    }

    @Test