diff --git a/src/com/android/settings/accounts/RemoveUserFragment.java b/src/com/android/settings/accounts/RemoveUserFragment.java index a6772ad437d..0fcf64fa8c4 100644 --- a/src/com/android/settings/accounts/RemoveUserFragment.java +++ b/src/com/android/settings/accounts/RemoveUserFragment.java @@ -26,7 +26,7 @@ import com.android.internal.logging.nano.MetricsProto.MetricsEvent; import com.android.settings.core.instrumentation.InstrumentedDialogFragment; import com.android.settings.users.UserDialogs; -class RemoveUserFragment extends InstrumentedDialogFragment { +public class RemoveUserFragment extends InstrumentedDialogFragment { private static final String ARG_USER_ID = "userId"; static RemoveUserFragment newInstance(int userId) { diff --git a/tests/robotests/src/com/android/settings/accounts/RemoveUserFragmentTest.java b/tests/robotests/src/com/android/settings/accounts/RemoveUserFragmentTest.java new file mode 100644 index 00000000000..965b6dc8b15 --- /dev/null +++ b/tests/robotests/src/com/android/settings/accounts/RemoveUserFragmentTest.java @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.settings.accounts; + +import com.android.settings.SettingsRobolectricTestRunner; +import com.android.settings.TestConfig; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.robolectric.annotation.Config; + +import java.lang.reflect.Modifier; + +import static com.google.common.truth.Truth.assertThat; + +@RunWith(SettingsRobolectricTestRunner.class) +@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION) +public class RemoveUserFragmentTest { + + @Test + public void testClassModifier_shouldBePublic() { + final int modifiers = RemoveUserFragment.class.getModifiers(); + + assertThat(Modifier.isPublic(modifiers)).isTrue(); + } +} diff --git a/tests/robotests/src/com/android/settings/dashboard/ProgressiveDisclosureTest.java b/tests/robotests/src/com/android/settings/dashboard/ProgressiveDisclosureTest.java index ab94f3514a7..ffc68744231 100644 --- a/tests/robotests/src/com/android/settings/dashboard/ProgressiveDisclosureTest.java +++ b/tests/robotests/src/com/android/settings/dashboard/ProgressiveDisclosureTest.java @@ -20,11 +20,12 @@ import android.content.Context; import android.support.v14.preference.PreferenceFragment; import android.support.v7.preference.Preference; import android.support.v7.preference.PreferenceScreen; + import com.android.settings.SettingsRobolectricTestRunner; import com.android.settings.TestConfig; import com.android.settings.overlay.FeatureFactory; import com.android.settings.testutils.FakeFeatureFactory; -import java.util.List; + import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -34,6 +35,8 @@ import org.mockito.MockitoAnnotations; import org.robolectric.annotation.Config; import org.robolectric.shadows.ShadowApplication; +import java.util.List; + import static com.google.common.truth.Truth.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyInt; @@ -86,6 +89,7 @@ public class ProgressiveDisclosureTest { public void shouldCollapse_morePreferenceThanLimit() { when(mFakeFeatureFactory.dashboardFeatureProvider.isEnabled()).thenReturn(true); when(mScreen.getPreferenceCount()).thenReturn(5); + mMixin.setTileLimit(3); assertThat(mMixin.shouldCollapse(mScreen)).isTrue(); }