Sprint 8 #43

Merged
csimonapastore merged 20 commits from sprints/8 into main 2025-06-21 01:11:03 +02:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit 87adaffa3e - Show all commits

View File

@@ -572,7 +572,7 @@ public class UserController_Tests
Assert.Fail($"_userController is null");
}
DatabaseSqlServer.User user = null;
DatabaseSqlServer.User? user = null;
UpdateUserRequest request = new UpdateUserRequest()
{
@@ -872,11 +872,11 @@ public class UserController_Tests
_roleServiceMock?.Setup(s => s.GetRoleByGuidAsync(It.IsAny<string>())).ReturnsAsync(role);
_userServiceMock?.Setup(s => s.GetUserByGuidAsync(It.IsAny<string>())).ReturnsAsync(user);
_userServiceMock?.Setup(s => s.UpdateUserPasswordAsync(
It.IsAny<User>(), It.IsAny<string>()
_userServiceMock?.Setup(s => s.UpdateUserRoleAsync(
It.IsAny<User>(), It.IsAny<Role>()
)).ThrowsAsync(new Exception("Unexpected error"));
ObjectResult response = (ObjectResult)await _userController.UpdateUserPasswordAsync(user.Guid, role.Guid);
ObjectResult response = (ObjectResult)await _userController.UpdateUserRoleAsync(user.Guid, role.Guid);
Assert.IsInstanceOfType(response, typeof(ObjectResult));
if (response != null && response.Value != null)

View File

@@ -4,6 +4,6 @@ namespace BasicDotnetTemplate.MainProject.Models.Api.Base;
public class ValidationError
{
public string Message { get; set; }
public Dictionary<string, List<string>> Errors { get; set; }
public string? Message { get; set; }
public Dictionary<string, List<string>>? Errors { get; set; }
}