Ejemplo n.º 1
0
        public Task TestFollowUser()
        {
            var    u    = Utils.RandomUsername();
            var    p    = Utils.RandomString(10);
            AVUser user = new AVUser()
            {
                Username = u,
                Password = p
            };

            return(user.SignUpAsync().ContinueWith(t =>
            {
                var query = new AVQuery <AVUser>();
                return query.FirstAsync();
            }).Unwrap().ContinueWith(s =>
            {
                var friend = s.Result;
                return user.FollowAsync(friend.ObjectId);
            }).Unwrap().ContinueWith(x =>
            {
                var rtn = x.Result;
                Assert.IsTrue(rtn);
                return Task.FromResult(0);
            }));
        }