public IdentityClaimsGetOutputClaimsIdentityProvider(IStaffInformationProvider staffInformationProvider, IAuthenticationProvider authenticationProvider, IDashboardUserClaimsInformationProvider<EdFiUserSecurityDetails> dashboardUserClaimsInformationProvider, IHttpRequestProvider httpRequestProvider) { this.staffInformationProvider = staffInformationProvider; this.authenticationProvider = authenticationProvider; this.dashboardUserClaimsInformationProvider = dashboardUserClaimsInformationProvider; this.httpRequestProvider = httpRequestProvider; }
protected override void EstablishContext() { staffInformationProvider = mocks.Stub<IStaffInformationProvider>(); authenticationProvider = mocks.Stub<IAuthenticationProvider>(); dashboardUserClaimsInformationProvider = mocks.Stub<IDashboardUserClaimsInformationProvider<EdFiUserSecurityDetails>>(); httpRequestProvider = mocks.Stub<IHttpRequestProvider>(); identity = mocks.Stub<IClaimsIdentity>(); principal = mocks.Stub<IClaimsPrincipal>(); Expect.Call(identity.Name).Return(userName); Expect.Call(principal.Identity).Return(identity); Expect.Call(staffInformationProvider.ResolveStaffUSI(authenticationProvider, userName)).Return(staffUSI); }