Esempio n. 1
0
        public void CanFindByLastnameSpec()
        {
            var spec    = new PersonByLastnameSpecification("Bohlen");
            var results = spec.SatisfyingElementsFrom(_people.AsQueryable());

            Assert.That(results.ToList(), Has.Member(_parent));
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the PersonByFirstnameOrLastnameSpecification class.
        /// </summary>
        /// <param name="firstname"></param>
        /// <param name="lastname"></param>
        public PersonByFirstnameAndLastnameSpecification(string firstname, string lastname)
        {
            _firstname = firstname;
            _lastname  = lastname;

            _fnameSpec = new PersonByFirstnameSpecification(_firstname);
            _lnameSpec = new PersonByLastnameSpecification(_lastname);
        }