Tests/Identity.Infrastructure.Tests/Services/IdentityServiceTests.cs
/// <summary>
/// Given null request
/// when initializing user password
/// throw <see cref="ArgumentNullException"/> exception
/// </summary>
Given null request
when initializing user password
throw  exception
Given null request when initializing user password throw exception
[Fact]
        public async Task InitializeUserPassword_RequestNull_ThrowArgumentNullException()
        {
            PasswordInitializationRequest request = null;
            ArgumentNullException exception = await Assert.ThrowsAsync<ArgumentNullException>(() =>
                _identityService.InitializeUserPasswordAsync(request)).ConfigureAwait(false);
            Assert.NotNull(exception);
            Assert.Equal(string.Format(ErrorMessages.NullExceptionMessage, "request"), exception.Message);
        }
[ Fact ] public async Task InitializeUserPassword_RequestNull_ThrowArgumentNullException ( ) { PasswordInitializationRequest request = null ; ArgumentNullException exception = await Assert . ThrowsAsync < ArgumentNullException > ( ( ) => _identityService . InitializeUserPasswordAsync ( request ) ) . ConfigureAwait ( false ) ; Assert . NotNull ( exception ) ; Assert . Equal ( string . Format ( ErrorMessages . NullExceptionMessage , " " ) , exception . Message ) ; }
Given null request
when initializing user password
throw  exception
Given null request when initializing user password throw exception
// Arrange // Act + Assert