コード例 #1
0
 public MockSignInManager(MockUserManager mum, TestContext tc)
     : base(mum,
            //The following mocks must be there, as SignInManager throws an exception if they are null.
            new Mock <IHttpContextAccessor>().Object,
            new Mock <IUserClaimsPrincipalFactory <GirafUser> >().Object,
            new Mock <IOptions <IdentityOptions> >().Object,
            new Mock <ILogger <SignInManager <GirafUser> > >().Object,
            new Mock <IAuthenticationSchemeProvider>().Object)
 {
     mum._signInManager   = this;
     usernamePasswordList = tc.MockUsers.Select(u => new Tuple <string, string>(u.UserName, "password")).ToList();
 }
コード例 #2
0
 public MockGirafService(MockDbContext context, MockUserManager userManager)
 {
     _context     = context;
     _userManager = userManager;
 }