public void Edit_Existing_Collaborator() { var edited = Api.EditCollaborator(ApplicationID, new Collaborator { Id = "5", Role = CollaboratorType.Collaborator, }); Assert.IsTrue(edited); }
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); }