示例#1
0
        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);
        }