Searched refs:mockContextAsUser (Results 1 – 2 of 2) sorted by relevance
86 Context mockContextAsUser = mock(Context.class); in testValidateProfileIdOfCurrentUser() local89 when(mMockContext.createContextAsUser(any(), anyInt())).thenReturn(mockContextAsUser); in testValidateProfileIdOfCurrentUser()90 when(mockContextAsUser.getSystemService(UserManager.class)).thenReturn(mMockUserMngr); in testValidateProfileIdOfCurrentUser()100 Context mockContextAsUser = mock(Context.class); in testValidateProfileIdOfDifferentUser() local104 when(mMockContext.createContextAsUser(any(), anyInt())).thenReturn(mockContextAsUser); in testValidateProfileIdOfDifferentUser()105 when(mockContextAsUser.getSystemService(UserManager.class)).thenReturn(mMockUserMngr); in testValidateProfileIdOfDifferentUser()
32 fun mockContextAsUser(context: Context, functor: BiConsumer<Context, UserHandle>? = null) = in <lambda>() method33 mockContextAsUser(context) { c, h -> functor?.accept(c, h) } in <lambda>()45 fun mockContextAsUser(context: Context, functor: ((Context, UserHandle) -> Unit)? = null) { in mockContextAsUser() method