Loading src/com/android/settings/accounts/RemoveUserFragment.java +1 −1 Original line number Diff line number Diff line Loading @@ -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) { Loading tests/robotests/src/com/android/settings/accounts/RemoveUserFragmentTest.java 0 → 100644 +40 −0 Original line number Diff line number Diff line /* * 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(); } } tests/robotests/src/com/android/settings/dashboard/ProgressiveDisclosureTest.java +5 −1 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading Loading @@ -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(); } Loading Loading
src/com/android/settings/accounts/RemoveUserFragment.java +1 −1 Original line number Diff line number Diff line Loading @@ -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) { Loading
tests/robotests/src/com/android/settings/accounts/RemoveUserFragmentTest.java 0 → 100644 +40 −0 Original line number Diff line number Diff line /* * 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(); } }
tests/robotests/src/com/android/settings/dashboard/ProgressiveDisclosureTest.java +5 −1 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading Loading @@ -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(); } Loading