Esempio n. 1
0
        public void RequestWithNonExistingAclSectionShouldThrow()
        {
            ISecureServiceBehavior behavior = new AclBehavior("invalidAcl");

            try
            {
                behavior.OnMethodAuthorizing(m_context, null);
                Assert.Fail();
            }
            catch (HttpResponseException ex)
            {
                Assert.That(ex.StatusCode, Is.EqualTo(HttpStatusCode.Forbidden));
            }
        }
Esempio n. 2
0
 public void RequestWithLocalAclSectionShouldNotThrow()
 {
     ISecureServiceBehavior behavior = new AclBehavior("localAcl");
     behavior.OnMethodAuthorizing(m_context, null);
 }