public void AddRemoveUserFromGroup() { // Arrange var ssoAdminClient = new SsoAdminClient(_vc, _user, _password, new AcceptAllX509CertificateValidator()); var expectedUserName = "******"; var expectedPassword = "******"; var newUser = ssoAdminClient.CreateLocalUser( expectedUserName, expectedPassword); var group = ssoAdminClient.GetGroups("administrators", newUser.Domain).FirstOrDefault <Group>(); // Act var addActual = ssoAdminClient.AddPersonUserToGroup(newUser, group); var removeActual = ssoAdminClient.RemovePersonUserFromGroup(newUser, group); // Assert Assert.IsTrue(addActual); Assert.IsTrue(removeActual); // Cleanup ssoAdminClient.DeleteLocalUser( newUser); }
public void GetRootLocalOsGroups() { // Arrange var ssoAdminClient = new SsoAdminClient(_vc, _user, _password, new AcceptAllX509CertificateValidator()); // Act var actual = ssoAdminClient.GetGroups("", "localos").ToArray(); // Assert Assert.NotNull(actual); Assert.Greater(actual.Length, 1); Assert.AreEqual("localos", actual[0].Domain); }