public void ShouldThrowExceptionWhenThrowExceptionIsTrue()
        {
            var sampleEndpoint = new SampleEndpoint { ThrowException = true };

            Assert.That(() => sampleEndpoint.SampleMethod(null), Throws.Exception);
        }
        public void ShouldNotThrowExceptionWhenThrowExceptionIsFalse()
        {
            var sampleEndpoint = new SampleEndpoint {ThrowException = false };

            Assert.That(() => sampleEndpoint.SampleMethod(null), Throws.Nothing);
        }