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

Commit 8ff4e94e authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Update notification wrapper tests to use the latest NotificationTestHelper

Change-Id: I2ed2843e5f02a341c6d62f1d6c96601531e39822
parent 93db50e6
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -25,8 +25,6 @@ import android.graphics.drawable.AnimatedImageDrawable;
import android.graphics.drawable.Icon;
import android.os.Bundle;
import android.testing.AndroidTestingRunner;
import android.testing.TestableLooper;
import android.testing.TestableLooper.RunWithLooper;
import android.view.LayoutInflater;
import android.view.View;

@@ -44,7 +42,6 @@ import org.junit.runner.RunWith;

@RunWith(AndroidTestingRunner.class)
@SmallTest
@RunWithLooper
public class NotificationBigPictureTemplateViewWrapperTest extends SysuiTestCase {

    private View mView;
@@ -53,11 +50,7 @@ public class NotificationBigPictureTemplateViewWrapperTest extends SysuiTestCase

    @Before
    public void setup() throws Exception {
        allowTestableLooperAsMainThread();
        NotificationTestHelper helper = new NotificationTestHelper(
                mContext,
                mDependency,
                TestableLooper.get(this));
        NotificationTestHelper helper = new NotificationTestHelper(mContext, mDependency);
        mView = LayoutInflater.from(mContext).inflate(
                com.android.internal.R.layout.notification_template_material_big_picture, null);
        mRow = helper.createRow();
+1 −5
Original line number Diff line number Diff line
@@ -18,8 +18,6 @@ package com.android.systemui.statusbar.notification.row.wrapper

import android.graphics.drawable.AnimatedImageDrawable
import android.testing.AndroidTestingRunner
import android.testing.TestableLooper
import android.testing.TestableLooper.RunWithLooper
import android.view.View
import androidx.test.filters.SmallTest
import com.android.internal.R
@@ -41,7 +39,6 @@ import org.mockito.Mockito.`when` as whenever

@SmallTest
@RunWith(AndroidTestingRunner::class)
@RunWithLooper
class NotificationConversationTemplateViewWrapperTest : SysuiTestCase() {

    private lateinit var mRow: ExpandableNotificationRow
@@ -49,8 +46,7 @@ class NotificationConversationTemplateViewWrapperTest : SysuiTestCase() {

    @Before
    fun setUp() {
        allowTestableLooperAsMainThread()
        helper = NotificationTestHelper(mContext, mDependency, TestableLooper.get(this))
        helper = NotificationTestHelper(mContext, mDependency)
        mRow = helper.createRow()
    }

+1 −8
Original line number Diff line number Diff line
@@ -17,8 +17,6 @@
package com.android.systemui.statusbar.notification.row.wrapper;

import android.testing.AndroidTestingRunner;
import android.testing.TestableLooper;
import android.testing.TestableLooper.RunWithLooper;
import android.view.View;
import android.widget.RemoteViews;

@@ -36,18 +34,13 @@ import org.junit.runner.RunWith;

@SmallTest
@RunWith(AndroidTestingRunner.class)
@RunWithLooper
public class NotificationCustomViewWrapperTest extends SysuiTestCase {

    private ExpandableNotificationRow mRow;

    @Before
    public void setUp() throws Exception {
        allowTestableLooperAsMainThread();
        NotificationTestHelper helper = new NotificationTestHelper(
                mContext,
                mDependency,
                TestableLooper.get(this));
        NotificationTestHelper helper = new NotificationTestHelper(mContext, mDependency);
        mRow = helper.createRow();
    }

+1 −5
Original line number Diff line number Diff line
@@ -18,8 +18,6 @@ package com.android.systemui.statusbar.notification.row.wrapper

import android.graphics.drawable.AnimatedImageDrawable
import android.testing.AndroidTestingRunner
import android.testing.TestableLooper
import android.testing.TestableLooper.RunWithLooper
import android.view.View
import androidx.test.filters.SmallTest
import com.android.internal.widget.MessagingGroup
@@ -39,7 +37,6 @@ import org.mockito.Mockito.`when` as whenever

@SmallTest
@RunWith(AndroidTestingRunner::class)
@RunWithLooper
class NotificationMessagingTemplateViewWrapperTest : SysuiTestCase() {

    private lateinit var mRow: ExpandableNotificationRow
@@ -47,8 +44,7 @@ class NotificationMessagingTemplateViewWrapperTest : SysuiTestCase() {

    @Before
    fun setUp() {
        allowTestableLooperAsMainThread()
        helper = NotificationTestHelper(mContext, mDependency, TestableLooper.get(this))
        helper = NotificationTestHelper(mContext, mDependency)
        mRow = helper.createRow()
    }

+1 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ class NotificationTemplateViewWrapperTest : SysuiTestCase() {
            TestUiOffloadThread(looper.looper)
        )

        helper = NotificationTestHelper(mContext, mDependency, looper)
        helper = NotificationTestHelper(mContext, mDependency)
        row = helper.createRow()
        // Some code in the view iterates through parents so we need some extra containers around
        // it.
Loading