public void TestInitialize() { this.timesheetControllerLogger = new Mock <ILogger <TimesheetController> >(); this.telemetryClient = new TelemetryClient(new TelemetryConfiguration()); this.timesheetContext = new Mock <TimesheetContext>(); this.timesheetRepository = new Mock <ITimesheetRepository>(); this.projectRepository = new Mock <IProjectRepository>(); this.repositoryAccessors = new Mock <IRepositoryAccessors>(); this.managerDashboardHelper = new Mock <IManagerDashboardHelper>(); this.mockBotSettings = Options.Create(new BotSettings() { MicrosoftAppId = string.Empty, MicrosoftAppPassword = string.Empty, AppBaseUri = string.Empty, CardCacheDurationInHour = 12, TimesheetFreezeDayOfMonth = 12, WeeklyEffortsLimit = 44, }); this.timesheetHelper = new Mock <ITimesheetHelper>(); this.timesheetController = new TimesheetController(this.timesheetControllerLogger.Object, this.telemetryClient, this.timesheetHelper.Object, this.managerDashboardHelper.Object, this.repositoryAccessors.Object); var httpContext = FakeHttpContext.MakeFakeContext(); this.timesheetController.ControllerContext = new ControllerContext { HttpContext = httpContext, }; }
public void AuthenticationMetadataControllerTestSetup() { this.logger = new Mock <ILogger <AuthenticationMetadataController> >(); this.controller = new AuthenticationMetadataController(this.logger.Object, TestData.AzureSettings, TestData.BotOptions); var httpContext = FakeHttpContext.MakeFakeContext(); this.controller.ControllerContext = new ControllerContext(); this.controller.ControllerContext.HttpContext = httpContext; }
public void TestInitialize() { this.logger = new Mock <ILogger <ManagerDashboardController> >(); this.telemetryClient = new TelemetryClient(new TelemetryConfiguration()); this.managerDashboardHelper = new Mock <IManagerDashboardHelper>(); this.managerDashboardController = new ManagerDashboardController(this.logger.Object, this.managerDashboardHelper.Object, this.telemetryClient); var httpContext = FakeHttpContext.MakeFakeContext(); this.managerDashboardController.ControllerContext = new ControllerContext { HttpContext = httpContext, }; }
public void TestInitialize() { this.logger = new Mock <ILogger <UserController> >(); this.telemetryClient = new TelemetryClient(new TelemetryConfiguration()); this.userGraphService = new Mock <IUsersService>(); this.timesheetHelper = new Mock <ITimesheetHelper>(); this.userController = new UserController(this.logger.Object, this.userGraphService.Object, this.telemetryClient, this.timesheetHelper.Object); var httpContext = FakeHttpContext.MakeFakeContext(); this.userController.ControllerContext = new ControllerContext { HttpContext = httpContext, }; }
public void TestInitialize() { this.logger = new Mock <ILogger <ProjectController> >(); this.telemetryClient = new TelemetryClient(new TelemetryConfiguration()); this.projectHelper = new Mock <IProjectHelper>(); this.userHelper = new Mock <IUserHelper>(); this.managerDashboardHelper = new Mock <IManagerDashboardHelper>(); this.repositoryAccessors = new Mock <IRepositoryAccessors>(); this.projectRepository = new Mock <IProjectRepository>(); this.memberRepository = new Mock <IMemberRepository>(); this.taskRepository = new Mock <ITaskRepository>(); this.taskHelper = new Mock <ITaskHelper>(); this.projectController = new ProjectController(this.logger.Object, this.projectHelper.Object, this.userHelper.Object, this.managerDashboardHelper.Object, this.telemetryClient, new TaskMapper(), this.taskHelper.Object, this.repositoryAccessors.Object); var httpContext = FakeHttpContext.MakeFakeContext(); this.projectController.ControllerContext = new ControllerContext { HttpContext = httpContext, }; }