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
Loading
Please register or sign in to comment