public void Should_Add_Retry_After_Header()
        {
            // arrange
            var module = new ServiceUnavailableModule();

            // act
            module.OnError(_httpContext.Object);

            // assert
            _httpResponse.Verify(response => response.AddHeader("Retry-After", "86400"));
        }
        public void Should_Throw_HttpException()
        {
            // arrange
            var module = new ServiceUnavailableModule();

            // act
            TestDelegate act = module.OnBeginRequest;

            // assert
            var exception = Assert.Throws<HttpException>(act);

            Assert.That(exception.GetHttpCode(), Is.EqualTo(503));
        }