public async Task GetUser() { IPlanGridApi api = PlanGridClient.Create(); User user = await api.GetUser(TestData.Project1Uid, TestData.ApiTestsUserUid); Assert.AreEqual(TestData.ApiTestsUserEmail, user.Email); Assert.IsTrue(!string.IsNullOrEmpty(user.Uid)); Role role = await api.Resolve(user.Role); Assert.AreEqual("Admin", role.Label); }
public async Task InviteAndRemoveUser() { IPlanGridApi api = PlanGridClient.Create(); User invitedUser = await api.InviteUser(TestData.Project1Uid, new UserInvitation { Email = TestData.InvitedUserEmail, RoleUid = TestData.AdminRoleId }); Assert.AreEqual(TestData.InvitedUserEmail, invitedUser.Email); Assert.IsFalse(invitedUser.IsRemoved); Assert.AreEqual(TestData.AdminRoleId, invitedUser.Role.Uid); await api.RemoveUser(TestData.Project1Uid, invitedUser.Uid); User user = await api.GetUser(TestData.Project1Uid, invitedUser.Uid); Assert.IsTrue(user.IsRemoved); }