test: 简单的查询测试
parent
56a051080a
commit
4e1139a73b
|
@ -10,15 +10,23 @@ namespace LeanCloudTests {
|
|||
AVClient.Initialize(new AVClient.Configuration {
|
||||
ApplicationId = "BMYV4RKSTwo8WSqt8q9ezcWF-gzGzoHsz",
|
||||
ApplicationKey = "pbf6Nk5seyjilexdpyrPwjSp",
|
||||
RTMServer = "https://router-g0-push.avoscloud.com",
|
||||
ApiServer = "https://avoscloud.com"
|
||||
});
|
||||
AVClient.HttpLog(TestContext.Out.WriteLine);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task TestQuery() {
|
||||
var query = new AVQuery<AVObject>("Foo");
|
||||
query.WhereEqualTo("content", "hello, world");
|
||||
var query = new AVQuery<AVObject>("Foo").WhereEqualTo("content", "hello");
|
||||
var results = await query.FindAsync();
|
||||
foreach (var result in results) {
|
||||
TestContext.Out.WriteLine(result.ObjectId);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task TestQueryCount() {
|
||||
var query = new AVQuery<AVObject>("Foo").WhereEqualTo("content", "hello, world");
|
||||
var count = await query.CountAsync();
|
||||
Assert.Greater(count, 8);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue