chore(M001/S01): auto-commit after complete-slice
This commit is contained in:
@@ -37,8 +37,9 @@ public sealed class JobApplicationsMariaDraftTests
|
||||
{
|
||||
var summarizer = new Mock<ISummarizerService>();
|
||||
summarizer.Setup(x => x.SummarizeSectionAsync(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<int>(), It.IsAny<int>())).ReturnsAsync("generated text");
|
||||
var users = CreateUserManager();
|
||||
|
||||
var controller = new JobApplicationsController(db, summarizer.Object, Mock.Of<IAppEmailSender>());
|
||||
var controller = new JobApplicationsController(db, summarizer.Object, Mock.Of<IAppEmailSender>(), users.Object);
|
||||
controller.ControllerContext = new ControllerContext
|
||||
{
|
||||
HttpContext = new DefaultHttpContext
|
||||
@@ -49,6 +50,21 @@ public sealed class JobApplicationsMariaDraftTests
|
||||
return controller;
|
||||
}
|
||||
|
||||
private static Mock<Microsoft.AspNetCore.Identity.UserManager<ApplicationUser>> CreateUserManager()
|
||||
{
|
||||
var store = new Mock<Microsoft.AspNetCore.Identity.IUserStore<ApplicationUser>>();
|
||||
return new Mock<Microsoft.AspNetCore.Identity.UserManager<ApplicationUser>>(
|
||||
store.Object,
|
||||
null!,
|
||||
null!,
|
||||
null!,
|
||||
null!,
|
||||
null!,
|
||||
null!,
|
||||
null!,
|
||||
null!);
|
||||
}
|
||||
|
||||
private static JobTrackerContext CreateDb()
|
||||
{
|
||||
var options = new DbContextOptionsBuilder<JobTrackerContext>()
|
||||
|
||||
Reference in New Issue
Block a user