public async Task When_Passing_Null_Parameter_Then_Exceptions_Are_Thrown()
        {
            // ARRANGE
            InitializeFakeObjects();

            // ACT & ASSERTS
            await Assert.ThrowsAsync <ArgumentNullException>(() => _getAuthorizationAction.Execute(new GetAuthorizationActionParameter(), null));

            await Assert.ThrowsAsync <ArgumentNullException>(() => _getAuthorizationAction.Execute(new GetAuthorizationActionParameter(), string.Empty));

            await Assert.ThrowsAsync <ArgumentNullException>(() => _getAuthorizationAction.Execute((IEnumerable <GetAuthorizationActionParameter>)null, null));

            await Assert.ThrowsAsync <ArgumentNullException>(() => _getAuthorizationAction.Execute(new GetAuthorizationActionParameter[0], null));

            await Assert.ThrowsAsync <ArgumentNullException>(() => _getAuthorizationAction.Execute(new GetAuthorizationActionParameter[0], string.Empty));
        }
Ejemplo n.º 2
0
 public async Task <AuthorizationResponse> GetAuthorization(
     GetAuthorizationActionParameter getAuthorizationActionParameter,
     string clientId)
 {
     return(await _getAuthorizationAction.Execute(getAuthorizationActionParameter, clientId));
 }