Skip to content

Commit 09832c0

Browse files
committed
Update UIHandlerAutomated.cs
1 parent bc73769 commit 09832c0

File tree

1 file changed

+28
-22
lines changed

1 file changed

+28
-22
lines changed

firestore/testapp/Assets/Firebase/Sample/Firestore/UIHandlerAutomated.cs

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2341,6 +2341,12 @@ Task TestQueries() {
23412341
return Async(() => {
23422342
// Initialize collection with a few test documents to query against.
23432343
var c = TestCollection();
2344+
2345+
string info = "(" + c.Id + ")";
2346+
Await(db.CollectionGroup(c.Id).GetSnapshotAsync().ContinueWith(t => {
2347+
info += "[" + t.Result.Count + "]";
2348+
}));
2349+
23442350
Await(c.Document("a").SetAsync(new Dictionary<string, object> {
23452351
{ "num", 1 },
23462352
{ "state", "created" },
@@ -2371,96 +2377,96 @@ Task TestQueries() {
23712377
}));
23722378

23732379
AssertQueryResults(
2374-
desc: "EqualTo",
2380+
desc: "EqualTo" + info,
23752381
query: c.WhereEqualTo("num", 1),
23762382
docIds: AsList("a"));
23772383
AssertQueryResults(
2378-
desc: "EqualTo (FieldPath)",
2384+
desc: "EqualTo (FieldPath)" + info,
23792385
query: c.WhereEqualTo(new FieldPath("num"), 1),
23802386
docIds: AsList("a"));
23812387

2382-
AssertQueryResults(desc: "NotEqualTo", query: c.WhereNotEqualTo("num", 1),
2388+
AssertQueryResults(desc: "NotEqualTo" + info, query: c.WhereNotEqualTo("num", 1),
23832389
docIds: AsList("b", "c"));
2384-
AssertQueryResults(desc: "NotEqualTo (FieldPath)",
2390+
AssertQueryResults(desc: "NotEqualTo (FieldPath)" + info,
23852391
query: c.WhereNotEqualTo(new FieldPath("num"), 1),
23862392
docIds: AsList("b", "c"));
2387-
AssertQueryResults(desc: "NotEqualTo (FieldPath) on nullable",
2393+
AssertQueryResults(desc: "NotEqualTo (FieldPath) on nullable" + info,
23882394
query: c.WhereNotEqualTo(new FieldPath("nullable"), null),
23892395
docIds: AsList("a"));
23902396

2391-
AssertQueryResults(desc: "LessThanOrEqualTo", query: c.WhereLessThanOrEqualTo("num", 2),
2397+
AssertQueryResults(desc: "LessThanOrEqualTo" + info, query: c.WhereLessThanOrEqualTo("num", 2),
23922398
docIds: AsList("a", "b"));
23932399
AssertQueryResults(
2394-
desc: "LessThanOrEqualTo (FieldPath)",
2400+
desc: "LessThanOrEqualTo (FieldPath)" + info,
23952401
query: c.WhereLessThanOrEqualTo(new FieldPath("num"), 2),
23962402
docIds: AsList("a", "b"));
23972403

23982404
AssertQueryResults(
2399-
desc: "LessThan",
2405+
desc: "LessThan" + info,
24002406
query: c.WhereLessThan("num", 2),
24012407
docIds: AsList("a"));
24022408
AssertQueryResults(
2403-
desc: "LessThan (FieldPath)",
2409+
desc: "LessThan (FieldPath)" + info,
24042410
query: c.WhereLessThan(new FieldPath("num"), 2),
24052411
docIds: AsList("a"));
24062412

24072413
AssertQueryResults(
2408-
desc: "GreaterThanOrEqualTo",
2414+
desc: "GreaterThanOrEqualTo" + info,
24092415
query: c.WhereGreaterThanOrEqualTo("num", 2),
24102416
docIds: AsList("b", "c"));
24112417
AssertQueryResults(
2412-
desc: "GreaterThanOrEqualTo (FieldPath)",
2418+
desc: "GreaterThanOrEqualTo (FieldPath)" + info,
24132419
query: c.WhereGreaterThanOrEqualTo(new FieldPath("num"), 2),
24142420
docIds: AsList("b", "c"));
24152421

24162422
AssertQueryResults(
2417-
desc: "GreaterThan",
2423+
desc: "GreaterThan" + info,
24182424
query: c.WhereGreaterThan("num", 2),
24192425
docIds: AsList("c"));
24202426
AssertQueryResults(
2421-
desc: "GreaterThan (FieldPath)",
2427+
desc: "GreaterThan (FieldPath)" + info,
24222428
query: c.WhereGreaterThan(new FieldPath("num"), 2),
24232429
docIds: AsList("c"));
24242430

24252431
AssertQueryResults(
2426-
desc: "two EqualTos",
2432+
desc: "two EqualTos" + info,
24272433
query: c.WhereEqualTo("state", "done").WhereEqualTo("active", false),
24282434
docIds: AsList("b"));
24292435

24302436
AssertQueryResults(
2431-
desc: "OrderBy, Limit",
2437+
desc: "OrderBy, Limit" + info,
24322438
query: c.OrderBy("num").Limit(2),
24332439
docIds: AsList("a", "b"));
24342440
AssertQueryResults(
2435-
desc: "OrderBy, Limit (FieldPath)",
2441+
desc: "OrderBy, Limit (FieldPath)" + info,
24362442
query: c.OrderBy(new FieldPath("num")).Limit(2),
24372443
docIds: AsList("a", "b"));
24382444

24392445
AssertQueryResults(
2440-
desc: "OrderByDescending, Limit",
2446+
desc: "OrderByDescending, Limit" + info,
24412447
query: c.OrderByDescending("num").Limit(2),
24422448
docIds: AsList("c", "b"));
24432449
AssertQueryResults(
2444-
desc: "OrderByDescending, Limit (FieldPath)",
2450+
desc: "OrderByDescending, Limit (FieldPath)" + info,
24452451
query: c.OrderByDescending(new FieldPath("num")).Limit(2),
24462452
docIds: AsList("c", "b"));
24472453

24482454
AssertQueryResults(
2449-
desc: "StartAfter",
2455+
desc: "StartAfter" + info,
24502456
query: c.OrderBy("num").StartAfter(2),
24512457
docIds: AsList("c"));
24522458
AssertQueryResults(
2453-
desc: "EndBefore",
2459+
desc: "EndBefore" + info,
24542460
query: c.OrderBy("num").EndBefore(2),
24552461
docIds: AsList("a"));
24562462
AssertQueryResults(
2457-
desc: "StartAt, EndAt",
2463+
desc: "StartAt, EndAt" + info,
24582464
query: c.OrderBy("num").StartAt(2).EndAt(2),
24592465
docIds: AsList("b"));
24602466

24612467
// Collection Group Query
24622468
AssertQueryResults(
2463-
desc: "CollectionGroup",
2469+
desc: "CollectionGroup" + info,
24642470
query: db.CollectionGroup(c.Id),
24652471
docIds: AsList("a", "b", "c", "d-nested")
24662472
);

0 commit comments

Comments
 (0)