public void ReassignTeam() { Project.Private = true; Project = ProjectEngine.SaveOrUpdate(Project, false); ProjectEngine.SetTeamSecurity(Project, From, ProjectTeamSecurity.Contacts | ProjectTeamSecurity.Files | ProjectTeamSecurity.Messages | ProjectTeamSecurity.Milestone | ProjectTeamSecurity.Tasks); ProjectsReassign.Reassign(From, To); var team = ProjectEngine.GetTeam(Project.ID).Select(r => r.ID).ToList(); Assert.That(team, Has.No.Member(From)); Assert.That(team, Has.Member(To)); var security = ProjectEngine.GetTeamSecurity(Project, To); Assert.That(security & ProjectTeamSecurity.Tasks, Is.EqualTo(ProjectTeamSecurity.Tasks)); Assert.That(security & ProjectTeamSecurity.Contacts, Is.EqualTo(ProjectTeamSecurity.Contacts)); Assert.That(security & ProjectTeamSecurity.Files, Is.EqualTo(ProjectTeamSecurity.Files)); Assert.That(security & ProjectTeamSecurity.Messages, Is.EqualTo(ProjectTeamSecurity.Messages)); Assert.That(security & ProjectTeamSecurity.Milestone, Is.EqualTo(ProjectTeamSecurity.Milestone)); }
protected List <Guid> GetTeam(int projectId) { return(ProjectEngine.GetTeam(projectId).Select(r => r.ID).ToList()); }