Arc.Unit.Tests.Domain.Specifications.SpecificationTests.Should_add_and_operator_to_specification C# (CSharp) Method

Should_add_and_operator_to_specification() private method

private Should_add_and_operator_to_specification ( ) : void
return void
        public void Should_add_and_operator_to_specification()
        {
            var target = new Specification<string>(x => x.Contains("a")).And(new Specification<string>(y => y.Length > 3));
            var items = new[] { "a", "aa", "aaa", "aaaa" };

            var result = (from item in items
                          where target.IsSatisfiedBy(item)
                          select item).ToList();

            foreach (var value in result)
            {
                Assert.That(value, Text.Contains("a"));
                Assert.That(value.Length, Is.GreaterThan(3));
            }
        }