/// <summary> /// Initializes a new instance of the <see cref="HomeController"/> class. /// </summary> /// <param name="userManager">User manager</param> /// <param name="goalsDbContext">Goals database context</param> /// <param name="goalManager">Goal manager</param> public HomeController( UserManager <ApplicationUser> userManager, GoalsDbContext goalsDbContext, IGoalManager goalManager) { this.userManager = userManager; this.goalsDbContext = goalsDbContext; this.goalManager = goalManager; }
public HomeControllerTests() { this.userManagerMock = IdentityTestUtils.MockUserManager <ApplicationUser>();; var options = new DbContextOptions <GoalsDbContext>(); this.goalsDbContext = new GoalsDbContext(options); this.goalManagerMock = new Mock <IGoalManager>(); this.controller = new HomeController( this.userManagerMock.Object, this.goalsDbContext, this.goalManagerMock.Object); }
/// <summary> /// Initializes a new instance of the <see cref="DatabaseGoalStorage"/> class. /// </summary> /// <param name="dbContext">Goals db context</param> public DatabaseGoalStorage(GoalsDbContext dbContext) { this.dbContext = dbContext; }