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); }
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(); } }
public static bool AddNewUser(string name, string username, string password, int roleId) { return(UserHandler.AddNewUser(name, username, password, roleId)); }