Beispiel #1
0
        public IEnumerator FieldFilterEqual()
        {
            yield return(T().YieldWait()); async Task T()
            {
                await SetupForQuery();

                var snap = await TestCollection.GetSnapshotAsync(("b", "==", "x"));

                var         enu     = snap.Documents.GetEnumerator();
                TestDataABC current = null;

                Assert.That(snap.Documents.Count(), Is.EqualTo(1));

                enu.MoveNext();
                current = enu.Current.ConvertTo <TestDataABC>();
                Assert.That(current.a, Is.EqualTo(1));
            }
        }
Beispiel #2
0
        public IEnumerator CompositeFilterMultipleEqualsWorksWithoutCompositeIndex()
        {
            yield return(T().YieldWait()); async Task T()
            {
                await SetupForQuery();

                var snap = await TestCollection.GetSnapshotAsync(("b", "==", "x"), ("a", "==", 1));

                var         enu     = snap.Documents.GetEnumerator();
                TestDataABC current = null;

                Assert.That(snap.Documents.Count(), Is.EqualTo(1));

                enu.MoveNext();
                current = enu.Current.ConvertTo <TestDataABC>();
                Assert.That(current.a, Is.EqualTo(1));

                snap = await TestCollection.GetSnapshotAsync(("b", "==", "x"), ("a", "==", 2), ("c", "==", 43.55));

                Assert.That(snap.Documents.Count(), Is.Zero);
            }
        }