コード例 #1
0
        public when_checking_can_authorize_with_target_that_can_authorize()
        {
            action_that_can_authorize    = new MySecurityAction(_ => true, _ => null);
            action_that_cannot_authorize = new MySecurityAction(_ => true, _ => null);

            descriptor = new SecurityDescriptor();
            descriptor.AddAction(action_that_cannot_authorize);
            descriptor.AddAction(action_that_can_authorize);
        }
        public when_checking_can_authorize_with_no_targets_that_can_authorize()
        {
            action_that_cannot_authorize         = new MySecurityAction(o => false, o => null);
            another_action_that_cannot_authorize = new MySecurityAction(o => false, o => null);

            descriptor = new SecurityDescriptor();
            descriptor.AddAction(another_action_that_cannot_authorize);
            descriptor.AddAction(action_that_cannot_authorize);
        }
コード例 #3
0
        public when_checking_can_authorize_with_target_that_can_authorize()
        {
            action_that_can_authorize    = new MySecurityAction(o => true, o => null);
            action_that_cannot_authorize = new MySecurityAction(o => true, ObjectDisposedException => null);

            descriptor = new SecurityDescriptor();
            descriptor.AddAction(action_that_cannot_authorize);
            descriptor.AddAction(action_that_can_authorize);
        }