public async Task When_Passing_Null_Parameter_Then_Exceptions_Are_Thrown() { // ARRANGE InitializeFakeObjects(); var localAuthenticationParameter = new LocalAuthenticationParameter(); // ACTS & ASSERTS await Assert.ThrowsAsync <ArgumentNullException>(() => _localUserAuthenticationAction.Execute(null, null, null)); await Assert.ThrowsAsync <ArgumentNullException>(() => _localUserAuthenticationAction.Execute(localAuthenticationParameter, null, null)); }
public async Task <LocalOpenIdAuthenticationResult> LocalOpenIdUserAuthentication(LocalAuthenticationParameter localAuthenticationParameter, AuthorizationParameter authorizationParameter, string code) { if (localAuthenticationParameter == null) { throw new ArgumentNullException("localAuthenticationParameter"); } if (authorizationParameter == null) { throw new ArgumentNullException("authorizationParameter"); } return(await _localOpenIdUserAuthenticationAction.Execute( localAuthenticationParameter, authorizationParameter, code)); }