Ejemplo n.º 1
0
        public async Task VisibleDisplayByFilterDataTestVideo()
        {
            var filter = new VisibleFilter {
                VideoRestrict = true, Take = 10
            };

            using var store   = GetDocumentStore();
            using var session = store.OpenAsyncSession();
            var query = new VisibleDisplayByFilter {
                Session = session, Filter = filter, CurrentUser = StandardUser
            };
            await query.Execute();

            query.Result.Should().NotBeNull();
            query.Result.Count().Should().Be(0);
        }
Ejemplo n.º 2
0
        public async Task VisibleDisplayByFilterDataTestImage()
        {
            var filter = new VisibleFilter {
                ImageRestrict = true, Take = 10
            };

            using var store   = GetDocumentStore();
            using var session = store.OpenAsyncSession();
            var query = new VisibleDisplayByFilter {
                Session = session, Filter = filter, CurrentUser = StandardUser
            };
            await query.Execute();

            query.Result.Should().NotBeNull();
            query.Result.Count().Should().Be(1);
            Assert.That(query.Result.First(), Is.DeepEqualTo(VisibleData.GetFirstDisplay()));
        }
Ejemplo n.º 3
0
        public async Task VisibleDisplayByFilterDataTestAuthor()
        {
            var filter = new VisibleFilter {
                AuthorKeys = new List <string> {
                    UserData.FirstId
                }, Take = 10
            };

            using var store   = GetDocumentStore();
            using var session = store.OpenAsyncSession();
            var query = new VisibleDisplayByFilter {
                Session = session, Filter = filter, CurrentUser = StandardUser
            };
            await query.Execute();

            query.Result.Should().NotBeNull();
            query.Result.Count().Should().Be(1);
        }