public void SelfHosted_Throws_When_NotSelfHosted()
        {
            var sha = new SelfHostedAttribute {
                SelfHostedOnly = true
            };

            Assert.Throws <BadRequestException>(() => sha.OnActionExecuting(GetContext(selfHosted: false)));
        }
        public void SelfHosted_Success_When_SelfHosted()
        {
            var sha = new SelfHostedAttribute {
                SelfHostedOnly = true
            };

            sha.OnActionExecuting(GetContext(selfHosted: true));
        }
        public void NotSelfHosted_Throws_When_SelfHosted()
        {
            // Arrange
            var sha = new SelfHostedAttribute {
                NotSelfHostedOnly = true
            };

            // Act & Assert
            Assert.Throws <BadRequestException>(() => sha.OnActionExecuting(GetContext(selfHosted: true)));
        }
        public void SelfHosted_Success_When_SelfHosted()
        {
            // Arrange
            var sha = new SelfHostedAttribute {
                SelfHostedOnly = true
            };

            // Act
            sha.OnActionExecuting(GetContext(selfHosted: true));

            // Assert
            // The Assert here is just NOT throwing an exception
        }