public void Test_AccessGranted() { _testHelper.ExpectFunctionalSecurityStrategyHasAccess(GeneralAccessTypes.Create, true); _testHelper.ReplayAll(); _securityClient.CheckConstructorAccess(typeof(SecurableObject)); _testHelper.VerifyAll(); }
public void Test_WithParamsArray() { _testHelper.ExpectFunctionalSecurityStrategyHasAccess(TestAccessTypes.First, true); _testHelper.ReplayAll(); _securityClient.CheckStatelessAccess(typeof(SecurableObject), AccessType.Get(TestAccessTypes.First)); _testHelper.VerifyAll(); }
public void Test_AccessGranted() { _testHelper.ExpectPermissionReflectorGetRequiredMethodPermissions(_methodInformation, TestAccessTypes.First); _testHelper.ExpectFunctionalSecurityStrategyHasAccess(TestAccessTypes.First, true); _testHelper.ReplayAll(); _securityClient.CheckStaticMethodAccess(typeof(SecurableObject), _methodInformation); _testHelper.VerifyAll(); }
public void Test_WithParamsArray() { _testHelper.ExpectFunctionalSecurityStrategyHasAccess(TestAccessTypes.First, true); _testHelper.ReplayAll(); bool hasAccess = _securityClient.HasStatelessAccess(typeof(SecurableObject), AccessType.Get(TestAccessTypes.First)); _testHelper.VerifyAll(); Assert.That(hasAccess, Is.EqualTo(true)); }
public void Test_AccessGranted() { _testHelper.ExpectFunctionalSecurityStrategyHasAccess(GeneralAccessTypes.Create, true); _testHelper.ReplayAll(); bool hasAccess = _securityClient.HasConstructorAccess(typeof(SecurableObject)); _testHelper.VerifyAll(); Assert.That(hasAccess, Is.True); }
public void Test_AccessGranted() { _testHelper.ExpectMemberResolverGetMethodInformation("InstanceMethod", MemberAffiliation.Instance, _methodInformation); _testHelper.ExpectPermissionReflectorGetRequiredMethodPermissions(_methodInformation, TestAccessTypes.First); _testHelper.ExpectFunctionalSecurityStrategyHasAccess(TestAccessTypes.First, true); _testHelper.ReplayAll(); bool hasAccess = _securityClient.HasStatelessMethodAccess(typeof(SecurableObject), "InstanceMethod"); _testHelper.VerifyAll(); Assert.That(hasAccess, Is.True); }