Пример #1
0
        public static UserManager <User> GetSetupedUserManager(string userId)
        {
            var mockedUserManger = GetUserManager();

            CommonSetupMockMethods.SetupMockedUserManagerGetUserId(mockedUserManger, userId);

            return(mockedUserManger.Object);
        }
Пример #2
0
        public static Mock <UserManager <User> > GetSetupedUserManager(bool isInRole)
        {
            var mockedUserManager = GetUserManager();

            CommonSetupMockMethods.SetupMockedUserManagerIsInRoleAsync(mockedUserManager, isInRole);

            return(mockedUserManager);
        }
Пример #3
0
        public static Mock <SignInManager <User> > GetSetupedSignInManager(bool isSignIn)
        {
            var userManager         = GetUserManager().Object;
            var mockedSignInManager = GetSignInManager(userManager);

            CommonSetupMockMethods.SetupMockedSignInManagerIsSignIn(mockedSignInManager, isSignIn);

            return(mockedSignInManager);
        }