Example #1
0
 public UserProfileService(IProfileSettingsService profileSettingsService, IUserProfileProvider userProfileProvider, IContactFacetsService contactFacetsService, IAccountTrackerService accountTrackerService)
 {
     _profileSettingsService = profileSettingsService;
     _userProfileProvider    = userProfileProvider;
     _contactFacetsService   = contactFacetsService;
     _accountTrackerService  = accountTrackerService;
 }
Example #2
0
 public UserProfileService(IProfileSettingsService profileSettingsService, IUserProfileProvider userProfileProvider, IUpdateContactFacetsService updateContactFacetsService, IAccountTrackerService accountTrackerService)
 {
     this.profileSettingsService     = profileSettingsService;
     this.userProfileProvider        = userProfileProvider;
     this.updateContactFacetsService = updateContactFacetsService;
     this.accountTrackerService      = accountTrackerService;
 }
Example #3
0
 public AccountRepository(IAccountTrackerService accountTrackerService)
 {
     this.accountTrackerService = accountTrackerService;
 }
Example #4
0
 public AccountRepository(PipelineService pipelineService, IAccountTrackerService accountTrackerService)
 {
     _accountTrackerService = accountTrackerService;
     _pipelineService       = pipelineService;
 }
        public void Register_ValidUser_ShouldTrackRegistraionEvents(FakeMembershipUser user, [Substitute] MembershipProvider membershipProvider, [Substitute] AuthenticationProvider authenticationProvider, RegistrationInfo registrationInfo, [Frozen] IAccountTrackerService accountTrackerService, AccountRepository repository, string profileId)
        {
            user.UserName.Returns("name");
            MembershipCreateStatus status;

            membershipProvider.CreateUser(Arg.Any <string>(), Arg.Any <string>(), Arg.Any <string>(), Arg.Any <string>(), Arg.Any <string>(), Arg.Any <bool>(), Arg.Any <object>(), out status).Returns(user);
            membershipProvider.GetUser(Arg.Any <string>(), Arg.Any <bool>()).Returns(user);

            using (new Switcher <Domain, Domain>(new Domain("somedomain")))
            {
                using (new MembershipSwitcher(membershipProvider))
                {
                    using (new AuthenticationSwitcher(authenticationProvider))
                    {
                        repository.RegisterUser(registrationInfo.Email, registrationInfo.Password, profileId);
                        accountTrackerService.Received(1).TrackRegistration();
                    }
                }
            }
        }
        public void Login_NotLoggedInUser_ShouldNotTrackLoginEvents(FakeMembershipUser user, [Frozen] IAccountTrackerService accountTrackerService, AuthenticationProvider authenticationProvider, AccountRepository repo)
        {
            authenticationProvider.Login(@"somedomain\John", Arg.Any <string>(), Arg.Any <bool>()).Returns(false);

            var context = new FakeSiteContext(new StringDictionary
            {
                { "domain", "somedomain" }
            });

            using (new Switcher <Domain, Domain>(new Domain("somedomain")))
            {
                using (new AuthenticationSwitcher(authenticationProvider))
                {
                    repo.Login("John", "somepassword");
                    accountTrackerService.DidNotReceive().TrackLogin(Arg.Any <string>());
                }
            }
        }
Example #7
0
 public AccountRepository(IAccountTrackerService accountTrackerService)
 {
     this.accountTrackerService = accountTrackerService;
 }
Example #8
0
 public TrackLoggedOut(IAccountTrackerService accountTrackerService)
 {
     this.accountTrackerService = accountTrackerService;
 }
Example #9
0
 public TrackSignedIn(IAccountTrackerService accountTrackerService, IUpdateContactFacetsService updateContactFacetsService, FederatedAuthenticationConfiguration federatedAuthenticationConfiguration)
 {
     this.AccountTrackerService                = accountTrackerService;
     this.UpdateContactFacetsService           = updateContactFacetsService;
     this.FederatedAuthenticationConfiguration = federatedAuthenticationConfiguration;
 }
 public TrackRegistered(IAccountTrackerService accountTrackerService, IUserProfileService userProfileService)
 {
     _accountTrackerService = accountTrackerService;
     _userProfileService    = userProfileService;
 }
 public TrackRegistered(IAccountTrackerService accountTrackerService, IUpdateContactFacetsService updateContactFacetsService)
 {
     _accountTrackerService      = accountTrackerService;
     _updateContactFacetsService = updateContactFacetsService;
 }
Example #12
0
 public AccountRepository(PipelineService pipelineService, IAccountTrackerService accountTrackerService)
 {
     this.AccountTrackerService = accountTrackerService;
     this.pipelineService       = pipelineService;
 }
Example #13
0
 public TrackLoggedIn(IAccountTrackerService accountTrackerService)
 {
     _accountTrackerService = accountTrackerService;
 }
Example #14
0
 public TrackSignedIn(IAccountTrackerService accountTrackerService, FederatedAuthenticationConfiguration federatedAuthenticationConfiguration, IUserProfileService userProfileService)
 {
     _accountTrackerService = accountTrackerService;
     _federatedAuthenticationConfiguration = federatedAuthenticationConfiguration;
     _userProfileService = userProfileService;
 }