Revert^2 "Simplifying model testing rules"
35b6d322ab
Change-Id: I3ed574a517dbe350b6dfe5b1d3ed198203d22f44
This commit is contained in:
@@ -69,11 +69,10 @@ import com.android.launcher3.search.StringMatcherUtility;
|
||||
import com.android.launcher3.util.ActivityContextWrapper;
|
||||
import com.android.launcher3.util.FlagOp;
|
||||
import com.android.launcher3.util.IntArray;
|
||||
import com.android.launcher3.util.LauncherModelHelper.SandboxModelContext;
|
||||
import com.android.launcher3.util.SandboxApplication;
|
||||
import com.android.launcher3.util.TestUtil;
|
||||
import com.android.launcher3.views.BaseDragLayer;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
@@ -119,7 +118,7 @@ public class BubbleTextViewTest {
|
||||
private static final float SPACE_MULTIPLIER = 1;
|
||||
private static final float SPACE_EXTRA = 0;
|
||||
|
||||
private SandboxModelContext mModelContext;
|
||||
@Rule public SandboxApplication mModelContext = new SandboxApplication();
|
||||
|
||||
private BubbleTextView mBubbleTextView;
|
||||
private ItemInfoWithIcon mItemInfoWithIcon;
|
||||
@@ -131,7 +130,6 @@ public class BubbleTextViewTest {
|
||||
public void setUp() throws Exception {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
Utilities.enableRunningInTestHarnessForTests();
|
||||
mModelContext = new SandboxModelContext();
|
||||
LauncherPrefs.get(mModelContext).put(ENABLE_TWOLINE_ALLAPPS_TOGGLE, true);
|
||||
|
||||
mContext = new ActivityContextWrapper(mModelContext);
|
||||
@@ -160,11 +158,6 @@ public class BubbleTextViewTest {
|
||||
mGmailAppInfo = new AppInfo(componentName, "Gmail", WORK_HANDLE, new Intent());
|
||||
}
|
||||
|
||||
@After
|
||||
public void tearDown() {
|
||||
mModelContext.onDestroy();
|
||||
}
|
||||
|
||||
@Test
|
||||
@EnableFlags(Flags.FLAG_ENABLE_TWOLINE_TOGGLE)
|
||||
public void testEmptyString_flagOn() {
|
||||
|
||||
Reference in New Issue
Block a user