public void ExIsHttpRequestStatusExceptionAndStatusCodeIsTransient_ReturnsTrue(HttpStatusCode statusCode)
            {
                // Arrange
                var ex = new HttpRequestStatusException(statusCode, new Uri("http://example.org"));

                // Act
                var isTransient = SteamCommunityDataClient.IsTransient(ex);

                // Assert
                Assert.True(isTransient);
            }
            public void ExIsIOExceptionAndInnerExceptionIsNotSocketException_ReturnsFalse()
            {
                // Arrange
                var ex = new IOException(null);

                // Act
                var isTransient = SteamCommunityDataClient.IsTransient(ex);

                // Assert
                Assert.False(isTransient);
            }
            public void ReturnsFalse()
            {
                // Arrange
                var ex = new Exception();

                // Act
                var isTransient = SteamCommunityDataClient.IsTransient(ex);

                // Assert
                Assert.False(isTransient);
            }
            public void ExIsIOExceptionAndInnerExceptionIsSocketExceptionAndSocketErrorCodeIsNotTransient_ReturnsFalse()
            {
                // Arrange
                var innerException = new SocketException((int)SocketError.SocketNotSupported);
                var ex             = new IOException(null, innerException);

                // Act
                var isTransient = SteamCommunityDataClient.IsTransient(ex);

                // Assert
                Assert.False(isTransient);
            }
            public void ExIsIOExceptionAndInnerExceptionIsSocketExceptionAndSocketErrorCodeIsTransient_ReturnsTrue(int errorCode)
            {
                // Arrange
                var innerException = new SocketException(errorCode);
                var ex             = new IOException(null, innerException);

                // Act
                var isTransient = SteamCommunityDataClient.IsTransient(ex);

                // Assert
                Assert.True(isTransient);
            }
            public void ExIsHttpRequestStatusExceptionAndStatusCodeIsNotTransient_ReturnsFalse()
            {
                // Arrange
                var statusCode = HttpStatusCode.Forbidden;
                var ex         = new HttpRequestStatusException(statusCode, new Uri("http://example.org"));

                // Act
                var isTransient = SteamCommunityDataClient.IsTransient(ex);

                // Assert
                Assert.False(isTransient);
            }
            public void ExIsHttpRequestExceptionAndInnerExceptionIsNotWebException_ReturnsFalse()
            {
                // Arrange
                var inner = new Exception();
                var ex    = new HttpRequestException(null, inner);

                // Act
                var isTransient = SteamCommunityDataClient.IsTransient(ex);

                // Assert
                Assert.False(isTransient);
            }
            public void ExIsHttpRequestExceptionAndInnerExceptionIsWebExceptionAndStatusIsTransient_ReturnsTrue(WebExceptionStatus status)
            {
                // Arrange
                var inner = new WebException(null, status);
                var ex    = new HttpRequestException(null, inner);

                // Act
                var isTransient = SteamCommunityDataClient.IsTransient(ex);

                // Assert
                Assert.True(isTransient);
            }
            public void ExIsHttpRequestExceptionAndInnerExceptionIsWebExceptionAndStatusIsNotTransient_ReturnsFalse()
            {
                // Arrange
                var status = WebExceptionStatus.NameResolutionFailure;
                var inner  = new WebException(null, status);
                var ex     = new HttpRequestException(null, inner);

                // Act
                var isTransient = SteamCommunityDataClient.IsTransient(ex);

                // Assert
                Assert.False(isTransient);
            }