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> >()); }
public static PersistenceAwareSpecification <TEntity> operator &( PersistenceAwareSpecification <TEntity> spec1, PersistenceAwareSpecification <TEntity> spec2) { return(SpecificationLogic.And(spec1, spec2)); }
public static Specification <TEntity> operator &( Specification <TEntity> spec1, Specification <TEntity> spec2) { return(SpecificationLogic.And(spec1, spec2)); }