Exemplo n.º 1
0
        public async Task UserRefByFilterDataTestAuth()
        {
            var filter = new UserFilter {
                AuthRestrict = true, Take = 10
            };

            using var store   = GetDocumentStore();
            using var session = store.OpenAsyncSession();

            var query = new UserRefByFilter {
                Session = session, Filter = filter, CurrentUser = SuperUser
            };
            await query.Execute();

            query.Result.Should().NotBeNull();
            query.Result.Count().Should().Be(0);
        }
Exemplo n.º 2
0
        public async Task UserRefByFilterDataTestSearch()
        {
            var filter = new UserFilter {
                Search = "test", Take = 10
            };

            using var store   = GetDocumentStore();
            using var session = store.OpenAsyncSession();

            var query = new UserRefByFilter {
                Session = session, Filter = filter, CurrentUser = StandardUser
            };
            await query.Execute();

            query.Result.Should().NotBeNull();
            query.Result.Count().Should().Be(1);
            query.Result.First().Id.Should().Be(UserData.FirstId);
        }