Error fix in ChangeUserAuthDataRequestValidationTests.cs
This commit is contained in:
		| @@ -13,10 +13,10 @@ namespace VisaApi.Tests.Application.Validation.Users | |||||||
|         private readonly static ChangeUserAuthDataRequestFaker faker = new(); |         private readonly static ChangeUserAuthDataRequestFaker faker = new(); | ||||||
|  |  | ||||||
|         /// <summary> |         /// <summary> | ||||||
|         /// Test for <see cref="ChangeUserAuthDataRequest"/> validator that should return validation error for empty auth data |         /// Test for <see cref="ChangeUserAuthDataRequest"/> validator that should throw exception for empty auth data | ||||||
|         /// </summary> |         /// </summary> | ||||||
|         [Fact] |         [Fact] | ||||||
|         private async Task ValidateForEmptyAuthDataShouldReturnError() |         private async Task ValidateForEmptyAuthDataShouldThrow() | ||||||
|         { |         { | ||||||
|             var request = faker.Generate(); |             var request = faker.Generate(); | ||||||
|             request.NewAuthData = null!; |             request.NewAuthData = null!; | ||||||
| @@ -33,5 +33,17 @@ namespace VisaApi.Tests.Application.Validation.Users | |||||||
|  |  | ||||||
|             result.Should().NotBeNull(); |             result.Should().NotBeNull(); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |         /// <summary> | ||||||
|  |         /// Test for <see cref="ChangeUserAuthDataRequest"/> validator that should no errors for valid entity | ||||||
|  |         /// </summary> | ||||||
|  |         [Fact] | ||||||
|  |         private async Task ValidateForValidShouldReturnNoErrors() | ||||||
|  |         { | ||||||
|  |             var request = faker.Generate(); | ||||||
|  |             var result = await validator.ValidateAsync(request); | ||||||
|  |  | ||||||
|  |             result.IsValid.Should().BeTrue(); | ||||||
|  |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user