public async Task WhenCalled_ReturnsValidateOnPasswordHasher() { var helper = new FakeUserHelper1(); helper.FakePasswordHasher.Validate_Output = new PasswordValidateResult(valid: true); var user = new User() { PasswordHash = "hash" }; var result = await helper.ValidatePassword(user, "password"); Assert.Equal(helper.FakePasswordHasher.Validate_Output, result); }
public async Task WhenCalled_CallsValidateOnPasswordHasher() { var helper = new FakeUserHelper1(); helper.FakePasswordHasher.Validate_Output = new PasswordValidateResult(valid: true); var user = new User() { PasswordHash = "hash" }; await helper.ValidatePassword(user, "password"); Assert.Equal(user.PasswordHash, helper.FakePasswordHasher.Validate_InputHash); Assert.Equal("password", helper.FakePasswordHasher.Validate_InputPassword); }