public void GetAgeSpecificationsReturnsOrSpecificationIfQueryIsOr()
        {
            var builder = new SpecificationBuilder();
            ISpecification<Person> specification = builder.GetAgeSpecifications(SpecificationLogic.Or, 0, 0);

            Assert.IsInstanceOf<OrSpecification<Person>>(specification);
        }
        public void GetNameAndJobSpecificationReturnsOrSpecificationIfQueryIsOr()
        {
            var builder = new SpecificationBuilder();
            ISpecification<Person> specification = builder.GetNameAndJobSpecification(SpecificationLogic.Or, string.Empty, string.Empty);

            Assert.IsInstanceOf<OrSpecification<Person>>(specification);
        }
 public PersonFacade(PersonRepository repository,
     SpecificationBuilder specificationBuilder)
 {
     this._repository = repository;
     this._specificationBuilder = specificationBuilder;
 }
 public void GetSpecificationThrowsWhenQueryIsInvalid()
 {
     var builder = new SpecificationBuilder();
     builder.BuildSpecificationFromQuery(new PersonQuery() { JobLogic = SpecificationLogic.Invalid });
 }