public void Create_Get_Edit_Delete_Collaborator() { if (string.IsNullOrWhiteSpace(CollaboratorEmail)) { Assert.Inconclusive("Please specify a valid CollaboratorEmail, if you don't have one just uncomment the Ignore attribue"); } EnsureApplication(); var result = Api.CreateCollaborator(ApplicationSlug, CollaboratorEmail, Model.CollaboratorType.Collaborator); Assert.IsNotNull(result); Assert.AreNotEqual(0, result.Id); Assert.AreEqual(CreateStatus.Created, result.Status); var item = Api.GetCollaborator(ApplicationSlug, result.Id); Assert.IsNotNull(item); Assert.AreEqual(result.Id, item.Id); Assert.AreEqual(CollaboratorType.Collaborator, item.Role); item.Role = CollaboratorType.Administrator; var updated = Api.EditCollaborator(ApplicationSlug, item); Assert.IsTrue(updated); item = Api.GetCollaborator(ApplicationSlug, result.Id); Assert.IsNotNull(item); Assert.AreEqual(result.Id, item.Id); Assert.AreEqual(CollaboratorType.Administrator, item.Role); Api.DeleteCollaborator(ApplicationSlug, result.Id); }
public void Delete_Existing_Collaborator() { var deleted = Api.DeleteCollaborator(ApplicationID, "5"); Assert.IsTrue(deleted); }