Ejemplo n.º 1
0
        public AccountControllerTests()
        {
            this.userManagerMock   = IdentityTestUtils.MockUserManager <ApplicationUser>();
            this.signInManagerMock = IdentityTestUtils.MockSignInManager <ApplicationUser>(userManagerMock);

            this.controller = new AccountController(
                this.userManagerMock.Object,
                this.signInManagerMock.Object);

            this.controller.Url = this.CreateMockUrlHelper();
        }
Ejemplo n.º 2
0
        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);
        }