Skip to content
Commit 7d97bad8 authored by Felipe Leme's avatar Felipe Leme
Browse files

Refactored ExtendedMockitoTestCase into ExtendedMockitoRule

ExtendedMockitoTestCase was created mostly for session management
(to make sure tests properly closed the session and to clear some
internal mockito state that could cause OOM), but to be really
effective, all classes would have to extend it.

Given that constraint - and the fact that there is already a rule
to facilitate session management - this CL gets rid of that super
class and provide another rule instead (which's built on top of the
existing one).

Also fixed CpuInfoReaderTest, which was using %d instead of %s on
assertWithMessage() and replace those calls by expectWithMessage()).

Bug:
Test: atest \
      FrameworksMockingServicesTests:AlarmManagerServiceTest \
      FrameworksMockingServicesTests:ActivityManagerServiceInjectorTest \
      FrameworksMockingServicesTests:BroadcastQueueModernImplTest \
      FrameworksMockingServicesTests:CachedAppOptimizerTest \
      FrameworksMockingServicesTests:CpuInfoReaderTest \
      FrameworksMockingServicesTests:CpuMonitorServiceTest \
      FrameworksMockingServicesTests:UserManagerServiceTest \
      FrameworksMockingServicesTests:UserVisibilityMediatorMUMDTest \
      FrameworksMockingServicesTests:UserVisibilityMediatorMUPANDTest \
      FrameworksMockingServicesTests:UserVisibilityMediatorSUSDTest
Bug: 268515318

Change-Id: I59f3ee693cbad01e9289cf069b7d039840f7c811
parent d8f90306
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment