public void TestIsRetryable() { Exception ex = new Exception(); Assert.False(TeaCore.IsRetryable(ex)); TeaRetryableException webEx = new TeaRetryableException(); Assert.True(TeaCore.IsRetryable(webEx)); }
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); }