Example #1
0
        public async Task DelayResultIsSuc()
        {
            WriteLine($"调用开始 {DateTime.Now}");
            await Instance.DelayResult <int>(1, new System.TimeSpan(100));

            WriteLine($"调用结束 {DateTime.Now}");
            Assert.Pass();
        }
Example #2
0
 public async Task DownloadStringWithRetriesException()
 {
     try
     {
         WriteLine($"调用开始 {DateTime.Now}");
         await Instance.DownloadStringWithRetries("https://baidu.com");
     }
     catch (Exception ex)
     {
         WriteLine($"调用异常 {DateTime.Now}");
         WriteLine($"异常消息 {ex.Message}");
     }
 }
Example #3
0
 public async Task DownloadStringWithRetriesSuc()
 {
     WriteLine($"调用开始 {DateTime.Now}");
     await Instance.DownloadStringWithRetries("https://www.baidu.com/");
 }