oneRain 2021-04-30 16:29:51 +08:00
parent 7278f34977
commit 76692cff44
4 changed files with 9 additions and 9 deletions

View File

@ -18,7 +18,6 @@ namespace Storage.Test {
PublicWriteAccess = false PublicWriteAccess = false
}; };
account.Balance = 1024; account.Balance = 1024;
account["balance"] = 1024;
await account.Save(); await account.Save();
Assert.IsFalse(account.ACL.PublicReadAccess); Assert.IsFalse(account.ACL.PublicReadAccess);
Assert.IsFalse(account.ACL.PublicWriteAccess); Assert.IsFalse(account.ACL.PublicWriteAccess);

View File

@ -57,8 +57,8 @@ namespace Storage.Test {
LCLogger.LogDelegate += Print; LCLogger.LogDelegate += Print;
LCApplication.Initialize(AppId, AppKey, AppServer); LCApplication.Initialize(AppId, AppKey, AppServer);
LCObject.RegisterSubclass("Account", () => new Account()); LCObject.RegisterSubclass("Account", () => new Account());
LCObject.RegisterSubclass<Hello>("Hello", () => new Hello()); LCObject.RegisterSubclass("Hello", () => new Hello());
LCObject.RegisterSubclass<World>("World", () => new World()); LCObject.RegisterSubclass("World", () => new World());
} }
[TearDown] [TearDown]

View File

@ -23,9 +23,9 @@ namespace Storage.Test {
{ "k2", true }, { "k2", true },
{ "k3", "haha" } { "k3", "haha" }
}; };
LCObject nestedObj = new LCObject("World"); World nestedObj = new World();
nestedObj["content"] = "7788"; nestedObj.Content = "7788";
@object["objectValue"] = nestedObj; @object.World = nestedObj;
@object["pointerList"] = new List<object> { new LCObject("World"), nestedObj }; @object["pointerList"] = new List<object> { new LCObject("World"), nestedObj };
await @object.Save(); await @object.Save();

View File

@ -157,9 +157,10 @@ namespace Storage.Test {
[Test] [Test]
[Order(10)] [Order(10)]
public async Task UpdatePassword() { public async Task UpdatePassword() {
LCUser currentUser = await LCUser.Login("hello", "world"); LCUser currentUser = await LCUser.Login(TestPhone, TestPhone);
await currentUser.UpdatePassword("world", "newWorld"); string newPassword = "newpassword";
await currentUser.UpdatePassword("newWorld", "world"); await currentUser.UpdatePassword(TestPhone, newPassword);
await currentUser.UpdatePassword(newPassword, TestPhone);
} }
[Test] [Test]