Esempio n. 1
0
        public void RemoveAccessControlEntry_UnitTest()
        {
            IIdentityDescriptor descriptor = default(IIdentityDescriptor);

            ExecuteMethod(
                () => { return((IAccessControlList)GetInstance()); },
                instance =>
            {
                descriptor = IdentityDescriptorImpl_UnitTests.GetInstance();
                RemoveAccessControlEntry_PreCondition(instance, ref descriptor);
            },
                instance => { instance.RemoveAccessControlEntry(descriptor); },
                instance => { RemoveAccessControlEntry_PostValidate(instance, descriptor); });
        }
Esempio n. 2
0
        public void QueryAccessControlEntries_UnitTest()
        {
            IEnumerable <IIdentityDescriptor> descriptors = default(IEnumerable <IIdentityDescriptor>);

            ExecuteMethod(
                () => { return((IAccessControlList)GetInstance()); },
                instance =>
            {
                descriptors = IdentityDescriptorImpl_UnitTests.GetIEnumerableInstance();
                QueryAccessControlEntries_PreCondition(instance, ref descriptors);
            },
                instance => { instance.QueryAccessControlEntries(descriptors); },
                instance => { QueryAccessControlEntries_PostValidate(instance, descriptors); });
        }
Esempio n. 3
0
        public void RemovePermissions_UnitTest()
        {
            IIdentityDescriptor descriptor = default(IIdentityDescriptor);
            Int32 permissionsToRemove      = default(Int32);

            ExecuteMethod(
                () => { return((IAccessControlList)GetInstance()); },
                instance =>
            {
                descriptor          = IdentityDescriptorImpl_UnitTests.GetInstance();
                permissionsToRemove = default(Int32);     //No Constructor
                RemovePermissions_PreCondition(instance, ref descriptor, ref permissionsToRemove);
            },
                instance => { instance.RemovePermissions(descriptor, permissionsToRemove); },
                instance => { RemovePermissions_PostValidate(instance, descriptor, permissionsToRemove); });
        }
Esempio n. 4
0
        public void SetPermissions_UnitTest()
        {
            IIdentityDescriptor descriptor = default(IIdentityDescriptor);
            Int32   allow = default(Int32);
            Int32   deny  = default(Int32);
            Boolean merge = default(Boolean);

            ExecuteMethod(
                () => { return((IAccessControlList)GetInstance()); },
                instance =>
            {
                descriptor = IdentityDescriptorImpl_UnitTests.GetInstance();
                allow      = default(Int32);   //No Constructor
                deny       = default(Int32);   //No Constructor
                merge      = default(Boolean); //No Constructor
                SetPermissions_PreCondition(instance, ref descriptor, ref allow, ref deny, ref merge);
            },
                instance => { instance.SetPermissions(descriptor, allow, deny, merge); },
                instance => { SetPermissions_PostValidate(instance, descriptor, allow, deny, merge); });
        }