Beispiel #1
0
        public void ValidateSpecificGroupType_IsValid_IfBranchOfOwningGroup()
        {
            var groupType = GroupType.NewObject();
            var ace       = _testHelper.CreateAceWithBranchOfOwningGroup(groupType);

            AccessControlEntryValidationResult result = ace.Validate();

            Assert.That(result.IsValid, Is.True);
        }
Beispiel #2
0
        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));
            }
        }