public void testAndIsSatisifedBy() { AlwaysTrueSpec trueSpec = new AlwaysTrueSpec(); AlwaysFalseSpec falseSpec = new AlwaysFalseSpec(); NotSpecification<object> notSpecification = new NotSpecification<object>(trueSpec); Assert.False(notSpecification.isSatisfiedBy(new object())); notSpecification = new NotSpecification<object>(falseSpec); Assert.True(notSpecification.isSatisfiedBy(new object())); }
public void testAndIsSatisifedBy() { AlwaysTrueSpec trueSpec = new AlwaysTrueSpec(); AlwaysFalseSpec falseSpec = new AlwaysFalseSpec(); NotSpecification <object> notSpecification = new NotSpecification <object>(trueSpec); Assert.False(notSpecification.isSatisfiedBy(new object())); notSpecification = new NotSpecification <object>(falseSpec); Assert.True(notSpecification.isSatisfiedBy(new object())); }
public void testAndIsSatisifedBy() { AlwaysTrueSpec trueSpec = new AlwaysTrueSpec(); AlwaysFalseSpec falseSpec = new AlwaysFalseSpec(); OrSpecification<object> orSpecification = new OrSpecification<object>(trueSpec, trueSpec); Assert.True(orSpecification.isSatisfiedBy(new object())); orSpecification = new OrSpecification<object>(falseSpec, trueSpec); Assert.True(orSpecification.isSatisfiedBy(new object())); orSpecification = new OrSpecification<object>(trueSpec, falseSpec); Assert.True(orSpecification.isSatisfiedBy(new object())); orSpecification = new OrSpecification<object>(falseSpec, falseSpec); Assert.False(orSpecification.isSatisfiedBy(new object())); }
public void testAndIsSatisifedBy() { AlwaysTrueSpec trueSpec = new AlwaysTrueSpec(); AlwaysFalseSpec falseSpec = new AlwaysFalseSpec(); OrSpecification <object> orSpecification = new OrSpecification <object>(trueSpec, trueSpec); Assert.True(orSpecification.isSatisfiedBy(new object())); orSpecification = new OrSpecification <object>(falseSpec, trueSpec); Assert.True(orSpecification.isSatisfiedBy(new object())); orSpecification = new OrSpecification <object>(trueSpec, falseSpec); Assert.True(orSpecification.isSatisfiedBy(new object())); orSpecification = new OrSpecification <object>(falseSpec, falseSpec); Assert.False(orSpecification.isSatisfiedBy(new object())); }