Statistics
| Branch: | Revision:

root / trunk / hammock / src / net35 / Hammock / Specifications / AndSpecification.cs @ 0eea575a

History | View | Annotate | Download (398 Bytes)

1
namespace Hammock.Specifications
2
{
3
    internal class AndSpecification<T> : CompositeSpecificationBase<T>
4
    {
5
        public AndSpecification(ISpecification<T> one, ISpecification<T> other) : base(one, other)
6
        {
7
        }
8

    
9
        public override bool IsSatisfiedBy(T instance)
10
        {
11
            return One.IsSatisfiedBy(instance) && Other.IsSatisfiedBy(instance);
12
        }
13
    }
14
}