예제 #1
0
        public void GivenResponseWithIOException_WhenIsResponseTooLargeCalled_ThenPositiveResultExpected()
        {
            bool isResponseTooLarge = PageAdjuster.IsResponseTooLargeToRead(new Exception(string.Empty, new IOException()));

            isResponseTooLarge.Should().Be(true);
        }
예제 #2
0
        public void GivenResponseWithWebException_WhenIsResponseTooLargeCalled_ThenPositiveResultExpected()
        {
            bool isResponseTooLarge = PageAdjuster.IsResponseTooLargeToRead(new Exception(string.Empty, new WebException(string.Empty, WebExceptionStatus.ConnectionClosed)));

            isResponseTooLarge.Should().Be(true);
        }
예제 #3
0
        public void GivenResponseWithCommonException_WhenIsResponseTooLargeCalled_ThenNegativeResultExpected()
        {
            bool isResponseTooLarge = PageAdjuster.IsResponseTooLargeToRead(new Exception(null, new Exception()));

            isResponseTooLarge.Should().Be(false);
        }