コード例 #1
0
        public void Test_WithParamsArray()
        {
            _testHelper.ReplayAll();

            _securityClient.CheckAccess(_testHelper.SecurableObject, AccessType.Get(TestAccessTypes.First));

            _testHelper.VerifyAll();
        }
コード例 #2
0
        public void Test_AccessGranted()
        {
            _testHelper.ReplayAll();

            _securityClient.CheckStaticMethodAccess(typeof(SecurableObject), "IsValid");

            _testHelper.VerifyAll();
        }
コード例 #3
0
        public void Test_AccessGranted()
        {
            _testHelper.ReplayAll();

            _securityClient.CheckConstructorAccess(typeof(SecurableObject));

            _testHelper.VerifyAll();
        }
コード例 #4
0
        public void Test_WithParamsArray()
        {
            _testHelper.ReplayAll();

            bool hasAccess = _securityClient.HasStatelessAccess(typeof(SecurableObject), AccessType.Get(TestAccessTypes.First));

            _testHelper.VerifyAll();
            Assert.That(hasAccess, Is.EqualTo(true));
        }
コード例 #5
0
        public void Test_AccessGranted()
        {
            _testHelper.ReplayAll();

            bool hasAccess = _securityClient.HasConstructorAccess(typeof(SecurableObject));

            _testHelper.VerifyAll();
            Assert.That(hasAccess, Is.True);
        }
コード例 #6
0
        public void Test_AccessGranted()
        {
            _testHelper.ReplayAll();

            _securityClient.CheckMethodAccess(_testHelper.SecurableObject, "Show");

            _testHelper.VerifyAll();
        }
コード例 #7
0
        public void Test_AccessGranted()
        {
            _testHelper.ReplayAll();

            _securityClient.CheckPropertyReadAccess(_testHelper.SecurableObject, "IsVisible");

            _testHelper.VerifyAll();
        }
コード例 #8
0
        public void Test_AccessGranted()
        {
            _testHelper.ReplayAll();

            bool hasAccess = _securityClient.HasPropertyWriteAccess(_testHelper.SecurableObject, "IsVisible");

            Assert.That(hasAccess, Is.True);
            _testHelper.VerifyAll();
        }
コード例 #9
0
        public void Test_AccessGranted()
        {
            _testHelper.ReplayAll();

            bool hasAccess = _securityClient.HasMethodAccess(_testHelper.SecurableObject, "Show");

            _testHelper.VerifyAll();
            Assert.That(hasAccess, Is.True);
        }
コード例 #10
0
        public void Test_AccessGranted()
        {
            _testHelper.ReplayAll();

            bool hasAccess = _securityClient.HasStaticMethodAccess(typeof(SecurableObject), "IsValid");

            _testHelper.VerifyAll();
            Assert.That(hasAccess, Is.True);
        }