public void FullSubjectsExpr_NotRoles() { var result = DslParser.SubjectsExprParse().Parse(@"subjects group theta; not eta group f person max, andr"); result.Should().NotBeNull(); result.Roles.Should().BeNullOrEmpty(); result.SubjectGroups.Should().HaveCount(2); result.SubjectGroups[0].GroupName.Should().Be("theta"); result.SubjectGroups[0].ExcludedPersons.Should().BeEquivalentTo("eta"); result.SubjectGroups[1].GroupName.Should().Be("f"); result.SubjectGroups[1].ExcludedPersons.Should().BeEmpty(); result.Persons.Should().BeEquivalentTo("max", "andr"); }
public void FullSubjectsExpr_NotGroups() { var result = DslParser.SubjectsExprParse().Parse(@"subjects role alpha; not beta, gamma role u person max, andr"); result.Should().NotBeNull(); result.Roles.Should().HaveCount(2); result.Roles[0].RoleName.Should().Be("alpha"); result.Roles[0].ExcludedPersons.Should().BeEquivalentTo("beta", "gamma"); result.Roles[1].RoleName.Should().Be("u"); result.Roles[1].ExcludedPersons.Should().BeEmpty(); result.SubjectGroups.Should().BeNullOrEmpty(); result.Persons.Should().BeEquivalentTo("max", "andr"); }