示例#1
0
        public async void LoginTests()
        {
            //  var mvc = new MvcApplication();
            ApplicationUser superUser = await MvcApplication.GenerateSuperUserIfNotExists();

            Assert.True(superUser.UserName == GlobalNames.SuperUser);

            var acc = new AccountController
            {
            };

            var vm = new LoginViewModel
            {
                UserName = GlobalNames.SuperUser,
                Password = "******"
            };



            /*
             * using (var context = new ApplicationDbContext())
             * {
             *  var UserManager = new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(context));
             *
             *
             *  var res = acc.SignInManager.PasswordSignInAsync(vm.UserName, vm.Password, false, shouldLockout: false);
             *  Assert.True(res.Result == SignInStatus.Success);
             * }
             */
        }