diff --git a/test/Amazon.Extensions.CognitoAuthentication.IntegrationTests/SessionTests.cs b/test/Amazon.Extensions.CognitoAuthentication.IntegrationTests/SessionTests.cs index 0891692..acdbdee 100644 --- a/test/Amazon.Extensions.CognitoAuthentication.IntegrationTests/SessionTests.cs +++ b/test/Amazon.Extensions.CognitoAuthentication.IntegrationTests/SessionTests.cs @@ -19,6 +19,7 @@ using Amazon.CognitoIdentityProvider.Model; using Amazon.Extensions.CognitoAuthentication.Util; +using System.Linq; namespace Amazon.Extensions.CognitoAuthentication.IntegrationTests { @@ -55,7 +56,7 @@ await user.StartWithSrpAuthAsync(new InitiateSrpAuthRequest() }).ConfigureAwait(false); GetUserResponse userDetails = await user.GetUserDetailsAsync().ConfigureAwait(false); - Assert.True(string.Equals(userDetails.UserAttributes[2].Name, CognitoConstants.UserAttrEmail, StringComparison.Ordinal)); + Assert.True(userDetails.UserAttributes.Any(x => string.Equals(x.Name, CognitoConstants.UserAttrEmail, StringComparison.Ordinal))); Assert.Empty(userDetails.MFAOptions); }