Example #1
0
 public Task ReuqestVerifyEmailTest()
 {
     return(AVUser.RequestEmailVerifyAsync("*****@*****.**").ContinueWith(t =>
     {
         if (t.IsFaulted)
         {
             Assert.IsTrue(t.Exception.InnerException.InnerException is AVException);
             var e = t.Exception.InnerException.InnerException as AVException;
             Assert.AreEqual(e.Code, AVException.ErrorCode.InternalServerError);
             Assert.AreEqual(e.Message, "请不要往同一个邮件地址发送太多邮件。");
             return Task.FromResult(0);
         }
         else
         {
             Assert.IsTrue(t.Result);
             return Task.FromResult(0);
         }
     }));
 }