public async Task CreateUserWithIncorrectRoleList() { var newUser = new User("createUserWithIncorrectRoleTestName_" + Guid.NewGuid(), new[] { "testRole", "buildserver" }); var newUserPassword = "******"; await _repository.CreateUser(newUser.Name, newUserPassword, newUser.Roles.ToArray()); }
public async Task CreateUser() { var newUser = new User("createUserTestName_" + Guid.NewGuid(), new[] { "testRole" }); var newUserPassword = "******"; await _repository.CreateUser(newUser.Name, newUserPassword, newUser.Roles.ToArray()); var createdUser = await _repository.FindUserByNameAndPassword(newUser.Name, newUserPassword); Assert.IsNotNull(createdUser); Assert.AreEqual(createdUser.Name, newUser.Name); Assert.True(createdUser.Roles.SequenceEqual(newUser.Roles)); }