public void Ctor_InitializesNothing() { var entity = new LocalMembership(); entity.Id.ShouldEqual(0); entity.User.ShouldBeNull(); entity.PasswordHash.ShouldBeNull(); }
public void UserPasswordStoreInterface_HasPasswordAsync_DelegatesToUserLocalMembershipProperty(string passwordHash, bool expect) { var instance = new SecurityStore(null) as IUserPasswordStore <User, int>; var user = new User(); var localMembership = new LocalMembership { PasswordHash = passwordHash }; user.LocalMembership = localMembership; var result = instance.HasPasswordAsync(user).Result; result.ShouldEqual(expect); }
public void UserPasswordStoreInterface_GetPasswordHashAsync_DelegatesToUserLocalMembershipProperty() { var instance = new SecurityStore(null) as IUserPasswordStore <User, int>; var user = new User(); var localMembership = new LocalMembership { PasswordHash = Guid.NewGuid().ToString() }; user.LocalMembership = localMembership; var result = instance.GetPasswordHashAsync(user).Result; result.ShouldEqual(localMembership.PasswordHash); result.ShouldEqual(user.LocalMembership.PasswordHash); }
public ChangeLocalAccountPasswordEvent(LocalMembership membership) { Membership = membership; }
public CustomerAccountCreatedEvent(string email, LocalMembership membership) { Email = email; Membership = membership; }
public void UserPasswordStoreInterface_HasPasswordAsync_DelegatesToUserLocalMembershipProperty(string passwordHash, bool expect) { var instance = new SecurityStore(null) as IUserPasswordStore<User, int>; var user = new User(); var localMembership = new LocalMembership { PasswordHash = passwordHash }; user.LocalMembership = localMembership; var result = instance.HasPasswordAsync(user).Result; result.ShouldEqual(expect); }
public void UserPasswordStoreInterface_GetPasswordHashAsync_DelegatesToUserLocalMembershipProperty() { var instance = new SecurityStore(null) as IUserPasswordStore<User, int>; var user = new User(); var localMembership = new LocalMembership { PasswordHash = Guid.NewGuid().ToString() }; user.LocalMembership = localMembership; var result = instance.GetPasswordHashAsync(user).Result; result.ShouldEqual(localMembership.PasswordHash); result.ShouldEqual(user.LocalMembership.PasswordHash); }