From 76692cff4463e6b64e207e71e2b14513c0457323 Mon Sep 17 00:00:00 2001 From: oneRain Date: Fri, 30 Apr 2021 16:29:51 +0800 Subject: [PATCH] test --- Storage/Storage.Test/ACLTest.cs | 1 - Storage/Storage.Test/BaseTest.cs | 4 ++-- Storage/Storage.Test/ObjectTest.cs | 6 +++--- Storage/Storage.Test/UserTest.cs | 7 ++++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Storage/Storage.Test/ACLTest.cs b/Storage/Storage.Test/ACLTest.cs index c510d2c..0f5b365 100644 --- a/Storage/Storage.Test/ACLTest.cs +++ b/Storage/Storage.Test/ACLTest.cs @@ -18,7 +18,6 @@ namespace Storage.Test { PublicWriteAccess = false }; account.Balance = 1024; - account["balance"] = 1024; await account.Save(); Assert.IsFalse(account.ACL.PublicReadAccess); Assert.IsFalse(account.ACL.PublicWriteAccess); diff --git a/Storage/Storage.Test/BaseTest.cs b/Storage/Storage.Test/BaseTest.cs index 3295d68..cd2a0e6 100644 --- a/Storage/Storage.Test/BaseTest.cs +++ b/Storage/Storage.Test/BaseTest.cs @@ -57,8 +57,8 @@ namespace Storage.Test { LCLogger.LogDelegate += Print; LCApplication.Initialize(AppId, AppKey, AppServer); LCObject.RegisterSubclass("Account", () => new Account()); - LCObject.RegisterSubclass("Hello", () => new Hello()); - LCObject.RegisterSubclass("World", () => new World()); + LCObject.RegisterSubclass("Hello", () => new Hello()); + LCObject.RegisterSubclass("World", () => new World()); } [TearDown] diff --git a/Storage/Storage.Test/ObjectTest.cs b/Storage/Storage.Test/ObjectTest.cs index 471857f..60ad9e3 100644 --- a/Storage/Storage.Test/ObjectTest.cs +++ b/Storage/Storage.Test/ObjectTest.cs @@ -23,9 +23,9 @@ namespace Storage.Test { { "k2", true }, { "k3", "haha" } }; - LCObject nestedObj = new LCObject("World"); - nestedObj["content"] = "7788"; - @object["objectValue"] = nestedObj; + World nestedObj = new World(); + nestedObj.Content = "7788"; + @object.World = nestedObj; @object["pointerList"] = new List { new LCObject("World"), nestedObj }; await @object.Save(); diff --git a/Storage/Storage.Test/UserTest.cs b/Storage/Storage.Test/UserTest.cs index effa9e4..133da25 100644 --- a/Storage/Storage.Test/UserTest.cs +++ b/Storage/Storage.Test/UserTest.cs @@ -157,9 +157,10 @@ namespace Storage.Test { [Test] [Order(10)] public async Task UpdatePassword() { - LCUser currentUser = await LCUser.Login("hello", "world"); - await currentUser.UpdatePassword("world", "newWorld"); - await currentUser.UpdatePassword("newWorld", "world"); + LCUser currentUser = await LCUser.Login(TestPhone, TestPhone); + string newPassword = "newpassword"; + await currentUser.UpdatePassword(TestPhone, newPassword); + await currentUser.UpdatePassword(newPassword, TestPhone); } [Test]