public void testAndIsSatisifedBy() { AlwaysTrueSpec trueSpec = new AlwaysTrueSpec(); AlwaysFalseSpec falseSpec = new AlwaysFalseSpec(); AndSpecification<object> andSpecification = new AndSpecification<object>(trueSpec, trueSpec); Assert.True(andSpecification.isSatisfiedBy(new object())); andSpecification = new AndSpecification<object>(falseSpec, trueSpec); Assert.False(andSpecification.isSatisfiedBy(new object())); andSpecification = new AndSpecification<object>(trueSpec, falseSpec); Assert.False(andSpecification.isSatisfiedBy(new object())); andSpecification = new AndSpecification<object>(falseSpec, falseSpec); Assert.False(andSpecification.isSatisfiedBy(new object())); }
public void testAndIsSatisifedBy() { AlwaysTrueSpec trueSpec = new AlwaysTrueSpec(); AlwaysFalseSpec falseSpec = new AlwaysFalseSpec(); AndSpecification <object> andSpecification = new AndSpecification <object>(trueSpec, trueSpec); Assert.True(andSpecification.isSatisfiedBy(new object())); andSpecification = new AndSpecification <object>(falseSpec, trueSpec); Assert.False(andSpecification.isSatisfiedBy(new object())); andSpecification = new AndSpecification <object>(trueSpec, falseSpec); Assert.False(andSpecification.isSatisfiedBy(new object())); andSpecification = new AndSpecification <object>(falseSpec, falseSpec); Assert.False(andSpecification.isSatisfiedBy(new object())); }