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

Commit ece2c949 authored by James Lemieux's avatar James Lemieux Committed by Android (Google) Code Review
Browse files

Merge "Use binary resource support in robolectric"

parents f69ca4e9 ec3ad9eb
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -32,12 +32,13 @@ include frameworks/base/packages/SettingsLib/common.mk

include $(BUILD_PACKAGE)

#############################################
############################################################
# SettingsLib Robolectric test target.                     #
#############################################
############################################################
include $(CLEAR_VARS)

LOCAL_MODULE := SettingsLibRoboTests
LOCAL_MODULE_CLASS := JAVA_LIBRARIES

LOCAL_SRC_FILES := $(call all-java-files-under, src)

@@ -53,6 +54,9 @@ LOCAL_INSTRUMENTATION_FOR := SettingsLibShell

LOCAL_MODULE_TAGS := optional

# Generate test_config.properties
include external/robolectric-shadows/gen_test_config.mk

include $(BUILD_STATIC_JAVA_LIBRARY)

#############################################################
+0 −4
Original line number Diff line number Diff line
manifest=frameworks/base/packages/SettingsLib/tests/robotests/AndroidManifest.xml
sdk=NEWEST_SDK

shadows=\
   com.android.settingslib.testutils.shadow.ShadowXmlUtils
 No newline at end of file
+3 −2
Original line number Diff line number Diff line
@@ -30,10 +30,11 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.util.ReflectionHelpers;

@RunWith(SettingsLibRobolectricTestRunner.class)
@RunWith(RobolectricTestRunner.class)
public class CustomEditTextPreferenceComaptTest {

    @Mock
@@ -70,7 +71,7 @@ public class CustomEditTextPreferenceComaptTest {
    }

    private static class TestPreference extends CustomEditTextPreferenceCompat {
        public TestPreference(Context context) {
        private TestPreference(Context context) {
            super(context);
        }
    }
+3 −2
Original line number Diff line number Diff line
@@ -30,10 +30,11 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.util.ReflectionHelpers;

@RunWith(SettingsLibRobolectricTestRunner.class)
@RunWith(RobolectricTestRunner.class)
public class CustomEditTextPreferenceTest {

    @Mock
@@ -70,7 +71,7 @@ public class CustomEditTextPreferenceTest {
    }

    private static class TestPreference extends CustomEditTextPreference {
        public TestPreference(Context context) {
        private TestPreference(Context context) {
            super(context);
        }
    }
+2 −1
Original line number Diff line number Diff line
@@ -24,9 +24,10 @@ import android.system.StructUtsname;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;

@RunWith(SettingsLibRobolectricTestRunner.class)
@RunWith(RobolectricTestRunner.class)
public class DeviceInfoUtilsTest {

    private Context mContext;
Loading