Esempio n. 1
0
        public void TestMethod1()
        {
            Mock<IUsersRepository> mockRepo = new Mock<IUsersRepository>();
            Mock<IEmailer> fakeEmailer = new Mock<IEmailer>();
            Mock<ICompetencyHeadersRepository> fakeComp = new Mock<ICompetencyHeadersRepository>();

            UsersController controller = new UsersController(mockRepo.Object, fakeComp.Object, fakeEmailer.Object);

            User s = new User
            {
                Firstname = "Daniel",
                Lastname = "Something"
            };
            controller.Create(s, null, null);

            mockRepo.Verify(a => a.InsertOrUpdate(s));
            mockRepo.Verify(a => a.Save());
        }
 public AccountController(ApplicationUserManager userManager, ApplicationSignInManager signInManager, UsersController usersController)
 {
     UserManager           = userManager;
     SignInManager         = signInManager;
     this._usersController = usersController;
 }
 public AccountController(ApplicationUserManager userManager, ApplicationSignInManager signInManager, UsersController usersController )
 {
     UserManager = userManager;
     SignInManager = signInManager;
     this._usersController = usersController;
 }