chore(M001/S01): auto-commit after complete-slice

This commit is contained in:
2026-03-24 12:27:04 +01:00
parent 9f03d123d0
commit 13d4e29336
22 changed files with 970 additions and 118 deletions
@@ -22,8 +22,9 @@ public sealed class ProfileCvControllerTests
var user = new ApplicationUser();
var userManager = CreateUserManager();
userManager.Setup(x => x.GetUserAsync(It.IsAny<ClaimsPrincipal>())).ReturnsAsync(user);
var aiService = new Mock<ISummarizerService>();
var controller = new ProfileCvController(userManager.Object)
var controller = new ProfileCvController(userManager.Object, aiService.Object)
{
ControllerContext = new ControllerContext { HttpContext = new DefaultHttpContext() }
};
@@ -32,7 +33,7 @@ public sealed class ProfileCvControllerTests
var result = await controller.Upload(file);
var badRequest = Assert.IsType<BadRequestObjectResult>(result);
Assert.Contains("supported", StringComparison.OrdinalIgnoreCase, badRequest.Value?.ToString());
Assert.True((badRequest.Value?.ToString() ?? string.Empty).Contains("supported", StringComparison.OrdinalIgnoreCase));
}
[Fact]
@@ -42,8 +43,12 @@ public sealed class ProfileCvControllerTests
var userManager = CreateUserManager();
userManager.Setup(x => x.GetUserAsync(It.IsAny<ClaimsPrincipal>())).ReturnsAsync(user);
userManager.Setup(x => x.UpdateAsync(user)).ReturnsAsync(IdentityResult.Success);
var aiService = new Mock<ISummarizerService>();
aiService
.Setup(x => x.ExtractTextAsync(It.IsAny<Stream>(), It.IsAny<string>(), It.IsAny<string?>(), It.IsAny<CancellationToken>()))
.ReturnsAsync(new AiTextExtractionResult("# CV\nBuilt APIs and UIs", false, "text/markdown", null, 22, "resume.md"));
var controller = new ProfileCvController(userManager.Object)
var controller = new ProfileCvController(userManager.Object, aiService.Object)
{
ControllerContext = new ControllerContext { HttpContext = new DefaultHttpContext() }
};