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)); } }
public void RequestWithLocalAclSectionShouldNotThrow() { ISecureServiceBehavior behavior = new AclBehavior("localAcl"); behavior.OnMethodAuthorizing(m_context, null); }