// ------------------------------- Utility ------------------------------- private (WebmailContext, IMessageService) CreateTestTools(string name) { var context = CreateTestContext(name); var service = new SqlMessageService(context); return(context, service); }
// ---------------------------------- Utility ---------------------------------- private (WebmailContext, InboxController) CreateTestTools(string name) { var context = CreateTestContext(name); var messageService = new SqlMessageService(context); var controller = new InboxController(new SqlUserService(context, messageService), messageService) { ControllerContext = new ControllerContext { HttpContext = new DefaultHttpContext { User = new ClaimsPrincipal() } } }; return(context, controller); }