コード例 #1
0
        public void AddNewUserTest()
        {
            var userToInsert = new User()
            {
                Id       = Guid.NewGuid(),
                Name     = "new User",
                Password = "******",
                Roles    = "PAGE_1;PAGE_2,PAGE_3"
            };


            var user = _userHandler.AddNewUser(userToInsert).Result;

            Assert.IsNotNull(user);
        }
コード例 #2
0
 public void AddNewUserTest()
 {
     try
     {
         string login    = "******";
         string password = "******";
         int    i        = 0;
         while (userHandler.Login(login, password))
         {
             login = "******" + i;
             i++;
         }
         userHandler.AddNewUser(new User(login, password, 1));
     }
     catch (AssertFailedException)
     {
         Assert.Fail();
     }
 }
コード例 #3
0
 public static bool AddNewUser(string name, string username, string password, int roleId)
 {
     return(UserHandler.AddNewUser(name, username, password, roleId));
 }