public void TestSignUpASync() { Task.Run(async() => { var user = new NCMBUser(); user.Set("userName", "TestUser"); user.Set("password", "TestPass"); await user.SignUp(); Console.WriteLine(user.ObjectId()); Assert.AreNotEqual(user.ObjectId(), ""); await user.Delete(); NCMBUser.Logout(); }).GetAwaiter().GetResult(); }
public void TestLoginASync() { Task.Run(async() => { var user = new NCMBUser(); user.Set("userName", "TestLogin"); user.Set("password", "TestPass"); await user.SignUp(); user = new NCMBUser(); user.Set("userName", "TestLogin"); user.Set("password", "TestPass"); Assert.AreEqual(await user.Login(), true); Console.WriteLine(user.ObjectId()); Assert.AreNotEqual(user.ObjectId(), ""); Assert.AreNotEqual(_ncmb.SessionToken, ""); Assert.NotNull(_ncmb.SessionToken); await user.Delete(); NCMBUser.Logout(); }).GetAwaiter().GetResult(); }