public static Organization CreateOrganization(Account account) { var organization = new Organization { Title = "Welcome Organization", Administrador = account, Description = "This is your first Organization", IsArchived = false }; organization.AddMember(account); account.AddOrganization(organization); return(organization); }
public void AddMember_ExistingEmail_ThrowsException(Organization organization, OrganizationMemberDto member) { // Arrange member.Email = organization.Members[0].Email.ActualEmail; // Act Action act = () => organization.AddMember(member.Email, member.UserName, member.Permission, member.ChangeDate, member.ChangedBy); // Assert act.Should().Throw <ArgumentException>(); }
public static Organization CreateOrganizationDefault(Account account, string title, string desc) { var organization = new Organization { Title = title, Administrador = account, Description = desc, IsArchived = false }; organization.AddMember(account); organization.AddBoard(CreateBoard(account)); account.AddOrganization(organization); return(organization); }