public void ValidateSpecificGroupType_IsValid_IfBranchOfOwningGroup() { var groupType = GroupType.NewObject(); var ace = _testHelper.CreateAceWithBranchOfOwningGroup(groupType); AccessControlEntryValidationResult result = ace.Validate(); Assert.That(result.IsValid, Is.True); }
public void DeleteGroupType_WithAccessControlEntry() { DatabaseFixtures dbFixtures = new DatabaseFixtures(); AccessControlTestHelper testHelper = new AccessControlTestHelper(); using (testHelper.Transaction.EnterNonDiscardingScope()) { dbFixtures.CreateEmptyDomain(); GroupType groupType = testHelper.CreateGroupType("GroupType"); AccessControlEntry ace = testHelper.CreateAceWithBranchOfOwningGroup(groupType); ClientTransaction.Current.Commit(); groupType.Delete(); ClientTransaction.Current.Commit(); Assert.That(ace.State, Is.EqualTo(StateType.Invalid)); } }