コード例 #1
0
        public void TestIsRetryable()
        {
            Exception ex = new Exception();

            Assert.False(TeaCore.IsRetryable(ex));

            TeaRetryableException webEx = new TeaRetryableException();

            Assert.True(TeaCore.IsRetryable(webEx));
        }
コード例 #2
0
        public void TestTeaRetryableException()
        {
            HttpResponseMessage httpResponseMessage = new HttpResponseMessage();

            httpResponseMessage.StatusCode = HttpStatusCode.OK;
            httpResponseMessage.Content    = new StreamContent(new MemoryStream(Encoding.UTF8.GetBytes("test")));
            TeaResponse           response = new TeaResponse(httpResponseMessage);
            TeaRetryableException teaRetryableException = new TeaRetryableException();

            Assert.NotNull(teaRetryableException);
        }