From 9b1f03dc73acfcccbc1c917e6ba51c87e0ba81f0 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Wed, 10 Aug 2022 05:31:40 +0000 Subject: [PATCH] Relax strictness of mocks in DisplayLayoutTests - The mocking of the resources includes resource values that aren't currently tested, but should be mocked to be consistent with the other values. We should treat these as warnings and not a test blocker (might be a difference in the version of mockito used in studio dev) Bug: 239892577 Test: Run WMShellUnitTests from sysui studio Change-Id: I03594b6fb0889f29124882a1f61d7b94b4f90b55 --- .../src/com/android/wm/shell/common/DisplayLayoutTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/DisplayLayoutTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/DisplayLayoutTest.java index 514390fa52f9a..d467b399ebbba 100644 --- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/DisplayLayoutTest.java +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/DisplayLayoutTest.java @@ -47,6 +47,7 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; import org.mockito.MockitoSession; +import org.mockito.quality.Strictness; /** * Tests for {@link DisplayLayout}. @@ -62,6 +63,7 @@ public class DisplayLayoutTest extends ShellTestCase { public void setup() { mMockitoSession = mockitoSession() .initMocks(this) + .strictness(Strictness.WARN) .mockStatic(SystemBarUtils.class) .startMocking(); }