public void GivenNoRuleWhenAllowOrDenyCalledThenShouldThrowInvalidOperation(bool allow) { Assert.Throws <InvalidOperationException>(() => { if (allow) { target.Allow(); } else { target.Deny(); } }); }