Пример #1
0
        public void And_AllSpecificationsArePersistenceAware_ShouldReturnPersistenceAwareSpecification()
        {
            //Assert
            var specification1 = new TestPersistenceAwareSpec <TestEntity>(x => x.A == 1);
            var specification2 = new TestPersistenceAwareSpec <TestEntity>(x => x.B == 2);

            //Act
            var combinedSpec = SpecificationLogic.And(specification1, specification2);

            //Assert
            Assert.That(combinedSpec, Is.AssignableTo <PersistenceAndSpecification <TestEntity> >());
        }
Пример #2
0
 public static PersistenceAwareSpecification <TEntity> operator &(
     PersistenceAwareSpecification <TEntity> spec1,
     PersistenceAwareSpecification <TEntity> spec2)
 {
     return(SpecificationLogic.And(spec1, spec2));
 }
Пример #3
0
 public static Specification <TEntity> operator &(
     Specification <TEntity> spec1,
     Specification <TEntity> spec2)
 {
     return(SpecificationLogic.And(spec1, spec2));
 }