Exemple #1
0
        public Task TestRequestPasswordReset()
        {
            var mockController = new Mock <IAVUserController>();

            AVPlugins.Instance = new AVPlugins
            {
                UserController = mockController.Object
            };
            AVObject.RegisterSubclass <AVUser>();
            AVObject.RegisterSubclass <AVSession>();

            return(AVUser.RequestPasswordResetAsync("*****@*****.**").ContinueWith(t =>
            {
                Assert.False(t.IsFaulted);
                Assert.False(t.IsCanceled);
                mockController.Verify(obj => obj.RequestPasswordResetAsync("*****@*****.**",
                                                                           It.IsAny <CancellationToken>()), Times.Exactly(1));
            }));
        }