示例#1
0
        public async Task Handle_ExcludeWithTruePredicate_FiltersEntities()
        {
            var request = new ExcludeWithPredicateRequest {
                Name = "BAD"
            };

            var response = await Mediator.HandleAsync(request);

            Assert.IsFalse(response.HasErrors);
            Assert.NotNull(response.Result);
            Assert.NotNull(response.Result.Items);
            Assert.AreEqual(1, response.Result.Items.Count);
        }
示例#2
0
        public async Task Handle_ExcludeWithFalsePredicate_DoesNotFilterEntities()
        {
            var request = new ExcludeWithPredicateRequest {
                Name = string.Empty
            };

            var response = await Mediator.HandleAsync(request);

            Assert.IsFalse(response.HasErrors);
            Assert.NotNull(response.Result);
            Assert.NotNull(response.Result.Items);
            Assert.AreEqual(5, response.Result.Items.Count);
        }