コード例 #1
0
        public void ThrowExceptionOnUnsuccessfulStatus_WhenUnsuccessfulAndUnsupportedStatusCode_ThrowException()
        {
            var testInput = new FakeLiveSiteResponse(HttpStatusCode.NotAcceptable);

            testInput.ThrowExceptionOnUnsuccessfulStatus();

            //Expect exception
        }
コード例 #2
0
        public void ThrowExceptionOnUnsuccessfulStatus_WhenUnsuccessfulAndNotFound_ThrowNotFoundException()
        {
            var testInput = new FakeLiveSiteResponse(HttpStatusCode.NotFound);

            testInput.ThrowExceptionOnUnsuccessfulStatus();

            //Expect exception
        }
コード例 #3
0
        public void ThrowExceptionOnUnsuccessfulStatus_WhenUnsuccessfulAndConflict_ThrowConflictException()
        {
            var testInput = new FakeLiveSiteResponse(HttpStatusCode.Conflict);

            testInput.ThrowExceptionOnUnsuccessfulStatus();

            //Expect exception
        }
コード例 #4
0
        public void ThrowExceptionOnUnsuccessfulStatus_WhenUnsuccessfulAndUnauthorized_ThrowUnauthorizedException()
        {
            var testInput = new FakeLiveSiteResponse(HttpStatusCode.Unauthorized);

            testInput.ThrowExceptionOnUnsuccessfulStatus();

            //Expect exception
        }
コード例 #5
0
        public void ThrowExceptionOnUnsuccessfulStatus_WhenResponseIsSuccessful_DoesNotThrowException()
        {
            var testInput = new FakeLiveSiteResponse(HttpStatusCode.Accepted, true);

            testInput.ThrowExceptionOnUnsuccessfulStatus();

            //No exception
        }