Ejemplo n.º 1
0
 private IAdminHandle SignInAdmin(IGuestHandle gh)
 {
     IAdminHandle ah = gh.AuthenticateAdmin("admin", "admin");
     return ah;
 }
Ejemplo n.º 2
0
 public AdminController(IGuestHandleFactory guestHandleFactory)
 {
     _gh = guestHandleFactory.CreateHandle();
 }
Ejemplo n.º 3
0
        private AccountDto CreateSampleUser(IGuestHandle gh)
        {
            string userLogin = "******";
            string userEmail = "*****@*****.**";
            string userPassword = this.GetSampleUserPassword();

            AccountRegistrationDataDto ard = new AccountRegistrationDataDto
            {
                Login = userLogin,
                Email = userEmail,
                Password = userPassword,
            };

            gh.RegisterUser(ard);

            IAdminHandle ah = gh.AuthenticateAdmin("admin", "admin");
            AccountDto[] users = ah.EnumerateAllUsers();
            var user = users.Single(u => u.Login == userLogin);
            Assert.AreEqual(userEmail, user.Email);

            return user;
        }